public static int GetAllCameras (Camera[] cameras);

Parameters

camerasAn array to be filled up with cameras currently in the Scene.

Description

Fills an array of Camera with the current cameras in the Scene, without allocating a new array.

传入的数组必须为 allCamerasCount 的最小大小。 当数组大小大于 allCamerasCount 值时,将只填充第一个元素 到 allCamerasCount 值的元素。当数组大小小于 allCamerasCount 值时,将抛出参数异常。当传入的数组参数 为 null 时,该调用将抛出 nullreference 异常。

返回值表示数组中保存的摄像机数量。