public void StartChat() { ChatNewGui chatNewComponent = FindObjectOfType <ChatNewGui>(); chatNewComponent.UserName = this.idInput.text.Trim(); chatNewComponent.enabled = true; enabled = false; this.AppIdInputPanel.gameObject.SetActive(false); this.NameInputPanel.gameObject.SetActive(false); PlayerPrefs.SetString(NamePickNewGui.UserNamePlayerPref, chatNewComponent.UserName); }
public void Start() { this.chatNewComponent = FindObjectOfType<ChatNewGui>(); bool appIdMissing = string.IsNullOrEmpty(this.chatNewComponent.ChatAppId); this.AppIdInputPanel.gameObject.SetActive(appIdMissing); this.NameInputPanel.gameObject.SetActive(!appIdMissing); string prefsName = PlayerPrefs.GetString(NamePickNewGui.UserNamePlayerPref); if (!string.IsNullOrEmpty(prefsName)) { this.idInput.text = prefsName; } }
public void Start() { this.chatNewComponent = FindObjectOfType <ChatNewGui>(); bool appIdMissing = string.IsNullOrEmpty(this.chatNewComponent.ChatAppId); this.AppIdInputPanel.gameObject.SetActive(appIdMissing); this.NameInputPanel.gameObject.SetActive(!appIdMissing); string prefsName = PlayerPrefs.GetString(NamePickNewGui.UserNamePlayerPref); if (!string.IsNullOrEmpty(prefsName)) { this.idInput.text = prefsName; } }
public void Start() { this.guiCenteredRect = new Rect(Screen.width/2-GuiSize.x/2, Screen.height/2-GuiSize.y/2, GuiSize.x, GuiSize.y); this.chatNewComponent = this.GetComponent<ChatNewGui>(); if (this.chatNewComponent != null && this.chatNewComponent.enabled) { Debug.LogWarning("When using the NamePickGui, ChatNewGui should be disabled initially."); if (this.chatNewComponent.chatClient != null) { this.chatNewComponent.chatClient.Disconnect(); } this.chatNewComponent.enabled = false; } string prefsName = PlayerPrefs.GetString(NamePickGui.UserNamePlayerPref); if (!string.IsNullOrEmpty(prefsName)) { this.InputLine = prefsName; } }
public void Start() { this.guiCenteredRect = new Rect(Screen.width / 2 - GuiSize.x / 2, Screen.height / 2 - GuiSize.y / 2, GuiSize.x, GuiSize.y); this.chatNewComponent = this.GetComponent <ChatNewGui>(); if (this.chatNewComponent != null && this.chatNewComponent.enabled) { Debug.LogWarning("When using the NamePickGui, ChatNewGui should be disabled initially."); if (this.chatNewComponent.chatClient != null) { this.chatNewComponent.chatClient.Disconnect(); } this.chatNewComponent.enabled = false; } string prefsName = PlayerPrefs.GetString(NamePickGui.UserNamePlayerPref); if (!string.IsNullOrEmpty(prefsName)) { this.InputLine = prefsName; } }
public void OnPointerClick(PointerEventData eventData) { ChatNewGui handler = FindObjectOfType <ChatNewGui>(); handler.ShowChannel(this.Channel); }