//------------------------------------------------------ // GUI //------------------------------------------------------ public override void OnGUI() { foreach (var item in m_itemList) { var dir = item as DebugMenuDirectory; if (dir != null) { if (GUILayout.Button(item.name)) { DebugMenuManager.SetCurrent(dir); } continue; } item.OnGUI(); } }
//------------------------------------------------------ // lifetime //------------------------------------------------------ public DebugMenuItem(string path) { name = Path.GetFileName(path); m_directory = DebugMenuManager.GetDirectory(Path.GetDirectoryName(path)); m_directory.AddItem(this); }
//------------------------------------------------------ // unity system function //------------------------------------------------------ void OnGUI() { DebugMenuManager.OnGUI(Close); }