using UnityEngine;
using TMPro;
[RequireComponent(typeof(TextMeshProUGUI))]
public class NameLabel : MonoBehaviour {
void OnInstantiate(PhotonMessageInfo info)
{
var pView = GetComponentInParent<PhotonView>();
if (pView.isMine)
{
gameObject.SetActive(false);
return;
}
GetComponent<TextMeshProUGUI>().text = pView.owner.NickName;
}
}