コード例 #1
0
ファイル: NiceUIMenus.cs プロジェクト: pundirmr/unity_app_gui
 private static void InitUiController()
 {
     if (IsInitialized())
     {
         return;
     }
     m_UiController = ComponentUtils.InstantiatePrefab("UIController_pfb")?.GetComponent <UiController>();
 }
コード例 #2
0
 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
 }
コード例 #3
0
 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
 }