public static FindObjectsOfType ( Type type ) : Object[] | ||
type | Type | |
return | Object[] |
Camera[] cameras = FindObjectsOfType();
MyScript[] myScripts = FindObjectsOfType();
Transform[] transforms = FindObjectsOfTypeThis code will return an array of Transform objects that represent all the transforms currently active in the scene. Package library: UnityEngine.CoreModule();