kris
New Member
Posts: 3
|
Post by kris on Mar 26, 2024 11:16:41 GMT
Hello,
We have Gameobject with Camera, ProCamera2D and ProCamera2DPixelPerfect components attached.
During runtime, I would like to change:
viewport size
PPU
Zoom
For zoom, I have tried with:
ProCamera2D.Instance.Zoom((int)arg1 - (int)arg2);
ProCamera2D.Instance.CalculateScreenSize();
and
pixelPerfectCameraScript.Zoom = (int)arg2;
pixelPerfectCameraScript.ResizeCameraToPixelPerfect();
For PPU and Viewport I have tried changing these values in runtime (could not find them via ProCamera2D singleton):
pixelPerfectCameraScript.PixelsPerUnit
pixelPerfectCameraScript.TargetViewportSizeInPixels
But the camera view isn't changing. No errors in console.
Is there something I am doing wrong?
Best regards,
Kris
|
|