Skip to content

[Unity] How to Adjust the Camera Size

When we using Unity to make a 2D game, if you want to keep the aspect ratio of the camera shooting unchanged, but you want to dynamically adjust the shooting range, then we can adjust the orthographicSize parameter.

This parameter will directly affect the size in the camera properties.


Adjust Camera Size with Program

The fastest way is to use:

Camera.main.orthographicSize = SIZE;


SIZE is the size of the camera range you want.


References


Read More

Tags:

Leave a Reply