Hi all,
I want to use something like this, but I can’t:
if (Input.GetAxis(“Mouse ScrollWheel”))
{
gameObject.orthographicsize++;
}
script is attached to maincamera, but i can’t reach orthographic property through gameobject.xxx.
Best,
Hi all,
I want to use something like this, but I can’t:
if (Input.GetAxis(“Mouse ScrollWheel”))
{
gameObject.orthographicsize++;
}
script is attached to maincamera, but i can’t reach orthographic property through gameobject.xxx.
Best,
Try gameObject.GetComponent<Camera>().orthograpicSize++