private void Awake() { if (!Instance) { Instance = this; } else { Destroy(Instance); } }
private void Init() { if (PhotonNetwork.room != null) { init = true; GameObject.Find("RoomName").GetComponent<UILabel>().text = "Room \"" + PhotonNetwork.room.name + "\""; } PhotonCamera = GameObject.Find("Camera").GetComponent<ConnectToPhoton>(); inputField = GameObject.Find("InputField").transform.FindChild("Label").GetComponent<UILabel>(); sendButton = GameObject.Find("SendButton"); Timer = GameObject.Find("Timer").GetComponent<UILabel>(); }