2020-08-22 05:29:00 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using TMPro;
|
|
|
|
|
|
|
|
|
|
public class NicknameField : MonoBehaviour {
|
|
|
|
|
|
|
|
|
|
public TMP_InputField field;
|
|
|
|
|
|
|
|
|
|
private void Start() {
|
2020-08-22 05:41:26 +00:00
|
|
|
|
field.text = PlayerProperties.GetPlayerNickname();
|
2020-08-22 05:29:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Update() {
|
|
|
|
|
var nn = field.text;
|
|
|
|
|
if (PlayerProperties.localPlayer.NickName != nn){
|
2020-08-22 05:41:26 +00:00
|
|
|
|
PlayerProperties.SetPlayerNickname(nn);
|
2020-08-22 05:29:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|