Camera's half-size when in orthographic mode.
// Set the camera's ortho size to 5 camera.orthographic = true; camera.orthographicSize = 5;
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Example() { camera.orthographic = true; camera.orthographicSize = 5; } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Example() as void: camera.orthographic = true camera.orthographicSize = 5
// Set the main camera's ortho size to 5 Camera.main.orthographic = true; Camera.main.orthographicSize = 5;
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Example() { Camera.main.orthographic = true; Camera.main.orthographicSize = 5; } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Example() as void: Camera.main.orthographic = true Camera.main.orthographicSize = 5