Created
September 3, 2019 21:47
-
-
Save eduardonunesp/49553ec58b1fe94e1b5601f6099ca9d5 to your computer and use it in GitHub Desktop.
Camera Size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start() | |
{ | |
Camera cam = Camera.main; | |
float height = 2f * cam.orthographicSize; | |
float width = height * cam.aspect; | |
Debug.Log("Height: " + height); | |
Debug.Log("Width: " + width); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment