How do I get the bottom Y coordinate of the main camera?

I made this:

<pre>Vector3 stageDimensions = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, 0)); Debug.Log(stageDimensions.y);</pre>

But it seems it gets top Y coordinate of the main camera, not the bottom. How to get a bottom Y?

Screen coordinates start from bottom left in Unity. The higher the y value, the higher the object is in space.

Vector3 stageDimensions = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, 0, 0));
Debug.Log(stageDimensions.y);

Should work for you.