public void CloseLobby() { CastRemoteDisplayManager castDisplayManager = CastRemoteDisplayManager.GetInstance(); if (castDisplayManager.IsCasting()) { castDisplayManager.StopRemoteDisplaySession(); } gameNetworkManager.StopHost(); LocalGameFinder localGameFinder = GameObject.FindObjectOfType <LocalGameFinder>(); localGameFinder.StopBroadCasting(); SceneManager.LoadScene("MainMenuScene"); }
public void OnRemoteDisplayError(CastRemoteDisplayManager manager) { Debug.LogError("Casting failed: " + manager.GetLastError()); manager.StopRemoteDisplaySession(); }