how to loop trough gameobjects unity 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); }