public void StartChat() { ChatGui chatNewComponent = FindObjectOfType <ChatGui>(); chatNewComponent.UserName = this.idInput.text.Trim(); chatNewComponent.Connect(); photonManager.GameConnect(); enabled = false; PlayerPrefs.SetString(NamePickGui.UserNamePlayerPref, chatNewComponent.UserName); }