private void CreateLoadingScreen() { if (_loadingScreen != null) { return; } var go = ResourceLoader.LoadLoadingScreen(); if (go == null) { Log.Error(MessageGroup.Gameplay, "Cant load loading screen prefab"); return; } go = MainCanvasBehaviour.RegisterPanel(UIType.LoadingScreen, go); if (go == null) { return; } _loadingScreen = go.GetComponent <LoadingScreenBehaviour>(); if (_loadingScreen == null) { Log.Error(MessageGroup.Gameplay, "Loading screen dont have behaviour"); } #if UNITY_EDITOR // Only for initialization of gameplay controller on first scene while testing. if (IsOnStage) { GameplayController.CreateGameplayControllerOnStageLoaded(); } #endif }
private void CreateGameplayMenu() { var prefab = ResourceLoader.LoadGameplayMenu(); if (prefab == null) { Log.Error(MessageGroup.Gameplay, "Can't get gameplaymenu object"); return; } GameObject go; if (MainCanvasBehaviour.TryGetRegisteredPanel(UIType.GameplayMenu, out go)) { return; } go = MainCanvasBehaviour.RegisterPanel(UIType.GameplayMenu, prefab); go.name = "Gameplay Menu (DONT DESTROY)"; }
private void SetupGameplayGui() { var prefab = ResourceLoader.LoadGameplayGUI(); if (prefab == null) { Log.Error(MessageGroup.Gameplay, "Can't get gameplay gui object"); return; } if (_gameplayGui != null) { return; } if (MainCanvasBehaviour.TryGetRegisteredPanel(UIType.GameplayConsole, out _gameplayGui)) { return; } var go = MainCanvasBehaviour.RegisterPanel(UIType.GameplayConsole, prefab); go.name = "Gameplay Console"; }