private void OnDisable() { StopAllCoroutines(); _postGameCommander = null; DestroyObject(_leaderboardDisplay); _leaderboardDisplay = null; }
private IEnumerator CheckForResultsPage() { yield return(null); while (true) { ResultPage[] resultPages = FindObjectsOfType <ResultPage>(); if (resultPages != null && resultPages.Length > 0) { ResultPage resultPageBehaviour = resultPages[0]; _postGameCommander = new PostGameCommander(resultPageBehaviour); break; } yield return(null); } InputInterceptor.EnableInput(); }
private IEnumerator CheckForResultsPage() { yield return(null); while (true) { UnityEngine.Object[] resultPages = FindObjectsOfType(CommonReflectedTypeInfo.ResultPageType); if (resultPages != null && resultPages.Length > 0) { MonoBehaviour resultPageBehaviour = (MonoBehaviour)resultPages[0]; _postGameCommander = new PostGameCommander(resultPageBehaviour); break; } yield return(null); } InputInterceptor.EnableInput(); }