public static void HideLoadingScreen() { if (MainGameHandler.SceneManagerInstance == null) { return; } try { GameObject canvas = FindCanvas(); Transform loadingPanelTransform = canvas.transform.Find(_loadingPanelName); if (loadingPanelTransform == null || canvas == null) { throw new Exception("cannot find loading panel transform or canvas"); } LoadingPanelHandler panelHandler = loadingPanelTransform.gameObject.GetComponent <LoadingPanelHandler>(); if (panelHandler == null) { throw new Exception("cannot find panel handler"); } panelHandler.Fade(); } catch (Exception exception) { Debug.Log($"HideLoadingScreen(): {exception.Message}"); } }
private void HideLoadingScreen() { LoadingPanelHandler handler = _loadingScreen.GetComponent <LoadingPanelHandler>(); handler.Fade(); }