Version: 2021.3
言語: 日本語
public static int allCamerasCount ;

説明

The number of cameras in the current Scene.

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

using UnityEngine;

public class ExampleScript : MonoBehaviour { private int count;

void Start() { count = Camera.allCamerasCount; print("We've got " + count + " cameras"); } }