Camera.allCameras 所有相机

static var allCameras : Camera[]

Description描述

Returns all enabled cameras in the scene.

返回场景中所有启用的相机。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public int count = Camera.allCameras.Length;
	public void Awake() {
		print("We've got " + count + " cameras");
	}
}
var count : int = Camera.allCameras.Length;
print ("We've got " + count + " cameras");
Page last updated: 2011-3-7