unity loop all gameobjects in scene code example
Example: unity3d loop over all gameobjects
object[] obj = GameObject.FindSceneObjectsOfType(typeof (GameObject)); foreach (object o in obj) { GameObject g = (GameObject) o; Debug.Log(g.name); }