public override void OnGUI() { GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); sidebarScrollPos = EditorGUILayout.BeginScrollView(sidebarScrollPos); for (int i = 0; i < selectionLabels.Length; i++) { if (GUILayout.Toggle(i == selection, selectionLabels[i], EditorStyles.toolbarButton, GUILayout.Width(sidebarWidth))) { selection = i; } } EditorGUILayout.EndScrollView(); GUILayout.EndVertical(); EditorGUILayoutUtil.DrawLine(false, 2); GUILayout.BeginVertical(); if (selection == 0) { Editor editor = Editor.CreateEditor(TenaciousEditorSettings.GetOrCreateSettings()); editor.DrawHeader(); editor.OnInspectorGUI(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); }