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"; }