protected override void OnGUIWindow() { if (m_currentSubMenu == null) { RootScrollView.BeginScrollView(); { GUILayout.BeginVertical(UISkin.scrollView); GUILayout.Box(name); //If on, just list all the features for (int _i = 0; _i < m_subMenuList.Length; _i++) { DemoSubMenu _each = m_subMenuList[_i]; if (GUILayout.Button(_each.gameObject.name)) { EnableSubMenu(_each); break; } } GUILayout.EndVertical(); } RootScrollView.EndScrollView(); GUILayout.FlexibleSpace(); } }
private void Update() { if (m_currentSubMenu != null && !m_currentSubMenu.gameObject.activeSelf) { m_currentSubMenu = null; } }
private void Update () { if(m_currentSubMenu != null && !m_currentSubMenu.gameObject.activeSelf) { m_currentSubMenu = null; } }
private void EnableSubMenu(DemoSubMenu _enabledSubMenu) { DisableAllSubMenus(); //Enable new feature window _enabledSubMenu.gameObject.SetActive(true); //Save the window instance m_currentSubMenu = _enabledSubMenu; }
private void EnableSubMenu(DemoSubMenu _enabledSubMenu) { DisableAllSubMenus(); //Enable new feature window _enabledSubMenu.gameObject.SetActive(true); //Save the window instance m_currentSubMenu = _enabledSubMenu; }