using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class NicknameField : MonoBehaviour { public TMP_InputField field; private void Start() { field.text = PlayerProperties.GetPlayerNickname(); } private void Update() { var nn = field.text; if (PlayerProperties.localPlayer.NickName != nn){ PlayerProperties.SetPlayerNickname(nn); } } }