public void ChangeName() { if (Name_Text.text == Player.Name) { PopupUI.ShowWarning("Fail to change name", "The name you just input is same to your old name"); Name_Text.text = Player.Name; return; } else if (Name_Text.text == "") { PopupUI.ShowWarning("Fail to change name", "The name can't be empty"); Name_Text.text = Player.Name; return; } ServerRequest.ChangeName(Name_Text.text); }