private void OnLeaveButtonClicked() { Debug.Log("Leave button clicked"); if (!ReferenceEquals(app, null)) { app.leaveChannel(); app.unloadEngine(); app = null; SceneManager.LoadScene("WelcomeScene", LoadSceneMode.Single); } }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
private void OnJoinButtonClicked() { Debug.Log("join button clicked"); GameObject go = GameObject.Find("ChannelName"); InputField input = go.GetComponent <InputField>(); //init AgoraEngine if (ReferenceEquals(app, null)) { app = new AgoraInterface(); app.loadEngine(); } app.joinChannel(input.text); SceneManager.sceneLoaded += OnSceneFinishedLoading; // SceneManager.LoadScene("ChatScene", LoadSceneMode.Single); SceneManager.LoadScene("ChooseRoomScene", LoadSceneMode.Single); }