Hierarchy of my game objects (excerpt):
player{1|2}Text
are GUIText objects.
I would like to access these GUIText objects and modify their texts.
My code:
print (GameObject.Find ("player1Text"));
print (GameObject.Find ("player1Text").GetComponent<GUIText>());
print (GameObject.Find ("player1Text").GetComponentInChildren<GUIText>());
print (transform.Find ("player1Text").GetComponent<GUIText> ());
Output:
It seems that the first call actually finds the game object, however, a GUIText component cannot be found.
I greatly appreciate any hints and/or ideas.