Skip to content

Instantly share code, notes, and snippets.

@eduardonunesp
Created September 3, 2019 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardonunesp/49553ec58b1fe94e1b5601f6099ca9d5 to your computer and use it in GitHub Desktop.
Save eduardonunesp/49553ec58b1fe94e1b5601f6099ca9d5 to your computer and use it in GitHub Desktop.
Camera Size
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