private void InitCategories() { Debug.Log("InitCategories called..."); _categories = EditorUtils.GetListFromEnum <PaletteItem.Category>(); _categoryLabels = new List <string>(); foreach (PaletteItem.Category category in _categories) { _categoryLabels.Add(category.ToString()); } }
private void DrawModeGUI() { List <Mode> modes = EditorUtils.GetListFromEnum <Mode>(); List <string> modeLabels = new List <string>(); foreach (Mode mode in modes) { modeLabels.Add(mode.ToString()); } Handles.BeginGUI(); GUILayout.BeginArea(new Rect(10f, 10f, 360f, 40f)); _selectedMode = (Mode)GUILayout.Toolbar((int)_currentMode, modeLabels.ToArray(), GUILayout.ExpandHeight(true)); GUILayout.EndArea(); Handles.EndGUI(); }