#is this code right?
2 messages · Page 1 of 1 (latest)
yes, but player name should really be a SyncVar if you want other players to see it that weren't present when it was set.
2 messages · Page 1 of 1 (latest)
[Command]
public void SetName(string name)
{
ClientSetName(name);
}
[ClientRpc]
void ClientSetName(string name)
{
PlayerName = name;
gameObject.name = name;
DisplayName.text = name;
}
just checking before i make another build. still very new to this stuff
yes, but player name should really be a SyncVar if you want other players to see it that weren't present when it was set.