private static void InitUiController() { if (IsInitialized()) { return; } m_UiController = ComponentUtils.InstantiatePrefab("UIController_pfb")?.GetComponent <UiController>(); }
public void AddNavigationDrawerPanel() { #if UNITY_EDITOR if (NavigationDrawerPanel == null && !Application.isPlaying) { m_NavigationDrawerPanel = ComponentUtils.InstantiatePrefab("NavigationDrawerPanel_pfb")?.GetComponent<NavigationDrawerPanel>(); if (m_NavigationDrawerPanel != null) { m_NavigationDrawerPanel.transform.SetParent(GetComponent<RectTransform>(), false); } EditorUtility.DisplayDialog("Information", "Navigation Drawer panel has been successfully added!", "Ok"); return; } EditorUtility.DisplayDialog("Information", "You only need one drawer panel per application.\nAdding more is useless.", "Ok"); #endif }
public void AddActionBar() { #if UNITY_EDITOR if (ActionBar == null && !Application.isPlaying) { m_ActionBar = ComponentUtils.InstantiatePrefab("ActionBar_pfb")?.GetComponent<ActionBar>(); if (m_ActionBar != null) { m_ActionBar.transform.SetParent(GetComponent<RectTransform>(), false); } EditorUtility.DisplayDialog("Information", "ActionBar has been successfully added!", "Ok"); return; } EditorUtility.DisplayDialog("Information", "You only need one action bar per application.\nAdding more is useless.", "Ok"); #endif }