The aspect ratio (width divided by height).
aspect
ratio of the camera, the value will stay until you call camera.ResetAspect(); which resets the aspect to the screen's aspect ratio.
See Also: camera component, Screen class.if (camera.aspect > 1.0) print ("Screen is more wide than tall!"); else print ("Screen is more tall than wide!");
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Example() { if (camera.aspect > 1.0F) print("Screen is more wide than tall!"); else print("Screen is more tall than wide!"); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Example() as void: if camera.aspect > 1.0F: print('Screen is more wide than tall!') else: print('Screen is more tall than wide!')