how to change size of camera in unity code example
Example 1: how to edit Camera.size property unity
//To edit the .size property in a orthographic camera you can use the
//'orthographicSize' propery, like this
public Camera CameraObject;
private void Start()
{
//Sets size
CameraObject.orthographicSize = 3;
}
Example 2: unity change camera scale
//change camera zoom
Camera.main.orthographicSize = value