Hi!
In my game, every player has a child GameObject called “NameAbove” which contains GUIText component. Here’s my code:
//class Player
void Update()
{
//if(networkView.IsMine)
if (dataSet && !nameSet)
{
SetNameAbove(this.characterName); // i've tried also RPC - no result
}
}
[RPC]
void SetNameAbove(string n)
{
gameObject.transform.FindChild("NameAbove").GetComponent<GUIText>().text = n;
nameSet = true;
}
So i need every player to display his own name having set it to his child GO in GUIText component.
Thanx in advance.