Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


allCamerasCount

The number of cameras in the current Scene.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static int allCamerasCount { get; }

Remarks

Returns the size of the array that Camera.allCameras returns and the amount of cameras that Camera.GetAllCameras will fill.

Examples

using UnityEngine;public class ExampleScript : MonoBehaviour{ private int count; void Start() { count = Camera.allCamerasCount; print("We've got " + count + " cameras"); }}