// -------------------------------------------------------------------------------------------------------------------- // // Demo code for Photon Chat in Unity. // developer@exitgames.com // -------------------------------------------------------------------------------------------------------------------- using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; namespace Photon.Chat.Demo { public class ChannelSelector : MonoBehaviour, IPointerClickHandler { public string Channel; public void SetChannel(string channel) { this.Channel = channel; Text t = this.GetComponentInChildren(); t.text = this.Channel; } public void OnPointerClick(PointerEventData eventData) { ChatGui handler = FindObjectOfType(); handler.ShowChannel(this.Channel); } } }