private void OnListTitlebarGUI() { if (this.PrettyPath != null) { GUILayout.Label(this.PrettyPath, SirenixGUIStyles.RightAlignedGreyMiniLabel); AllEditorGUI.VerticalLineSeparator(); } if (this.IsPopulated) { GUILayout.Label(this.List.SmartValue.Count + " / " + this.toggleableAssets.Count, EditorStyles.centeredGreyMiniLabel); } else { GUILayout.Label("Scanning " + this.CurrentSearchingIndex + " / " + this.NumberOfResultsToSearch, SirenixGUIStyles.RightAlignedGreyMiniLabel); } bool disableGUI = !this.IsPopulated; if (disableGUI) { GUIHelper.PushGUIEnabled(false); } if (AllEditorGUI.ToolbarButton(EditorIcons.Refresh) && this.IsPopulated) { this.Rescan(); } if (AssetUtilities.CanCreateNewAsset <TElement>()) { if (AllEditorGUI.ToolbarButton(EditorIcons.Plus) && this.IsPopulated) { string path = this.PrettyPath; if (path == null) { var lastAsset = this.List.SmartValue.Count > 0 ? this.List.SmartValue[this.List.SmartValue.Count - 1] as TElement : null; if (lastAsset == null) { var lastToggleable = this.toggleableAssets.LastOrDefault(); if (lastToggleable != null) { lastAsset = lastToggleable.Object; } } if (lastAsset != null) { path = AssetUtilities.GetAssetLocation(lastAsset); } } AssetUtilities.CreateNewAsset <TElement>(path, null); this.Rescan(); } } if (disableGUI) { GUIHelper.PopGUIEnabled(); } }
private void DrawAddButton() { if (AllEditorGUI.ToolbarButton(EditorIcons.Plus)) { CustomButtons.Add(Random.Range(0, 100)); } Sirenix.Utilities.Editor.GUIHelper.PushGUIEnabled(GUI.enabled && this.CustomButtons.Count > 0); if (AllEditorGUI.ToolbarButton(EditorIcons.Minus)) { CustomButtons.RemoveAt(this.CustomButtons.Count - 1); } Sirenix.Utilities.Editor.GUIHelper.PopGUIEnabled(); }
private void GenericVariantsTitleGUI() { AllEditorGUI.VerticalLineSeparator(); GUILayout.Label("Last scan: " + DateTime.FromBinary(this.lastScan).ToString(), EditorStyles.centeredGreyMiniLabel); if (AllEditorGUI.ToolbarButton(new GUIContent(" Sort "))) { this.SortTypes(); } if (AllEditorGUI.ToolbarButton(EditorIcons.Plus)) { this.supportSerializedTypes.Insert(0, new TypeEntry() { IsCustom = true, Emit = true }); } }
private void DrawToolbar() { this.includeWarnings = EditorPrefs.GetBool("OdinValidation.includeWarnings", this.includeWarnings); this.includeErrors = EditorPrefs.GetBool("OdinValidation.includeErrors", this.includeErrors); this.includeValid = EditorPrefs.GetBool("OdinValidation.includeValid", this.includeValid); AllEditorGUI.BeginHorizontalToolbar(); { //GL.sRGBWrite = QualitySettings.activeColorSpace == ColorSpace.Linear; //this.includeValid = AllEditorGUI.ToolbarButton(new GUIContent(" " + this.validCount + " "), this.includeValid) ? !this.includeValid : this.includeValid; this.includeValid = AllEditorGUI.ToolbarToggle(this.includeValid, new GUIContent(" " + this.validCount + " ")); GUIHelper.PushColor(Color.green); GUI.DrawTexture(new Rect(GUILayoutUtility.GetLastRect().position + new Vector2(6, 4), new Vector2(16, 16)), EditorIcons.Checkmark.Highlighted, ScaleMode.ScaleToFit); GUIHelper.PopColor(); //this.includeWarnings = AllEditorGUI.ToolbarButton(new GUIContent(" " + this.warningCount + " "), this.includeWarnings) ? !this.includeWarnings : this.includeWarnings; this.includeWarnings = AllEditorGUI.ToolbarToggle(this.includeWarnings, new GUIContent(" " + this.warningCount + " ")); GUI.DrawTexture(new Rect(GUILayoutUtility.GetLastRect().position + Vector2.one * 2, new Vector2(20, 20)), EditorIcons.UnityWarningIcon, ScaleMode.ScaleToFit); //this.includeErrors = AllEditorGUI.ToolbarButton(new GUIContent(" " + this.errorCount + " "), this.includeErrors) ? !this.includeErrors : this.includeErrors; this.includeErrors = AllEditorGUI.ToolbarToggle(this.includeErrors, new GUIContent(" " + this.errorCount + " ")); GUI.DrawTexture(new Rect(GUILayoutUtility.GetLastRect().position + Vector2.one * 2, new Vector2(22, 22)), EditorIcons.UnityErrorIcon, ScaleMode.ScaleToFit); //GL.sRGBWrite = false; GUILayout.FlexibleSpace(); if (AllEditorGUI.ToolbarButton(GUIHelper.TempContent(" Scan Scene "))) { this.FullScan(); } } AllEditorGUI.EndHorizontalToolbar(); EditorPrefs.SetBool("OdinValidation.includeWarnings", this.includeWarnings); EditorPrefs.SetBool("OdinValidation.includeErrors", this.includeErrors); EditorPrefs.SetBool("OdinValidation.includeValid", this.includeValid); }
/// <summary> /// Not yet documented. /// </summary> protected override void DrawPropertyLayout(IPropertyValueEntry <TElement> entry, AssetListAttribute attribute, GUIContent label) { var config = entry.Property.Context.Get(this, "Test", (CurrentContext)null); if (config.Value == null) { config.Value = new CurrentContext(); config.Value.Attribute = attribute; config.Value.Tags = attribute.Tags != null?attribute.Tags.Trim().Split(',').Select(i => i.Trim()).ToArray() : null; config.Value.LayerNames = attribute.LayerNames != null?attribute.LayerNames.Trim().Split(',').Select(i => i.Trim()).ToArray() : null; config.Value.Property = entry.Property; if (attribute.Path != null) { var path = attribute.Path.Trim('/', ' '); path = "Assets/" + path + "/"; path = Application.dataPath + "/" + path; config.Value.AssetsFolderLocation = new DirectoryInfo(path); path = attribute.Path.TrimStart('/').TrimEnd('/'); config.Value.PrettyPath = "/" + path.TrimStart('/'); } if (attribute.CustomFilterMethod != null) { MethodInfo methodInfo; string error; if (MemberFinder.Start(entry.ParentType) .IsMethod() .IsNamed(attribute.CustomFilterMethod) .HasReturnType <bool>() .HasParameters <TElement>() .TryGetMember <MethodInfo>(out methodInfo, out error)) { if (methodInfo.IsStatic) { config.Value.StaticCustomIncludeMethod = (Func <TElement, bool>)Delegate.CreateDelegate(typeof(Func <TElement, bool>), methodInfo, true); } else { config.Value.InstanceCustomIncludeMethod = EmitUtilities.CreateWeakInstanceMethodCaller <bool, TElement>(methodInfo); } } config.Value.ErrorMessage = error; } if (config.Value.ErrorMessage != null) { // We can get away with lag on load. config.Value.MaxSearchDurationPrFrameInMS = 20; config.Value.EnsureListPopulation(); config.Value.MaxSearchDurationPrFrameInMS = 1; } } var currentValue = (UnityEngine.Object)entry.WeakSmartValue; if (config.Value.ErrorMessage != null) { AllEditorGUI.ErrorMessageBox(config.Value.ErrorMessage); } else { config.Value.EnsureListPopulation(); } AllEditorGUI.BeginIndentedVertical(SirenixGUIStyles.PropertyPadding); { AllEditorGUI.BeginHorizontalToolbar(); if (label != null) { GUILayout.Label(label); } GUILayout.FlexibleSpace(); if (config.Value.PrettyPath != null) { GUILayout.Label(config.Value.PrettyPath, SirenixGUIStyles.RightAlignedGreyMiniLabel); AllEditorGUI.VerticalLineSeparator(); } if (config.Value.IsPopulated) { GUILayout.Label(config.Value.AvailableAsset.Count + " items", SirenixGUIStyles.RightAlignedGreyMiniLabel); GUIHelper.PushGUIEnabled(GUI.enabled && (config.Value.AvailableAsset.Count > 0 && config.Value.ErrorMessage == null)); } else { GUILayout.Label("Scanning " + config.Value.CurrentSearchingIndex + " / " + config.Value.NumberOfResultsToSearch, SirenixGUIStyles.RightAlignedGreyMiniLabel); GUIHelper.PushGUIEnabled(false); } AllEditorGUI.VerticalLineSeparator(); bool drawConflict = entry.Property.ParentValues.Count > 1; if (drawConflict == false) { var index = config.Value.AvailableAsset.IndexOf(currentValue) + 1; if (index > 0) { GUILayout.Label(index.ToString(), SirenixGUIStyles.RightAlignedGreyMiniLabel); } else { drawConflict = true; } } if (drawConflict) { GUILayout.Label("-", SirenixGUIStyles.RightAlignedGreyMiniLabel); } if (AllEditorGUI.ToolbarButton(EditorIcons.TriangleLeft) && config.Value.IsPopulated) { var index = config.Value.AvailableAsset.IndexOf(currentValue) - 1; index = index < 0 ? config.Value.AvailableAsset.Count - 1 : index; entry.WeakSmartValue = config.Value.AvailableAsset[index]; } if (AllEditorGUI.ToolbarButton(EditorIcons.TriangleDown) && config.Value.IsPopulated) { GenericMenu m = new GenericMenu(); var selected = currentValue; int itemsPrPage = 40; bool showPages = config.Value.AvailableAsset.Count > 50; string page = ""; int selectedPage = (config.Value.AvailableAsset.IndexOf(entry.WeakSmartValue as UnityEngine.Object) / itemsPrPage); for (int i = 0; i < config.Value.AvailableAsset.Count; i++) { var obj = config.Value.AvailableAsset[i]; if (obj != null) { var path = AssetDatabase.GetAssetPath(obj); var name = string.IsNullOrEmpty(path) ? obj.name : path.Substring(7).Replace("/", "\\"); var localEntry = entry; if (showPages) { var p = (i / itemsPrPage); page = (p * itemsPrPage) + " - " + Mathf.Min(((p + 1) * itemsPrPage), config.Value.AvailableAsset.Count - 1); if (selectedPage == p) { page += " (contains selected)"; } page += "/"; } m.AddItem(new GUIContent(page + name), obj == selected, () => { localEntry.Property.Tree.DelayActionUntilRepaint(() => localEntry.WeakSmartValue = obj); }); } } m.ShowAsContext(); } if (AllEditorGUI.ToolbarButton(EditorIcons.TriangleRight) && config.Value.IsPopulated) { var index = config.Value.AvailableAsset.IndexOf(currentValue) + 1; entry.WeakSmartValue = config.Value.AvailableAsset[index % config.Value.AvailableAsset.Count]; } GUIHelper.PopGUIEnabled(); AllEditorGUI.EndHorizontalToolbar(); AllEditorGUI.BeginVerticalList(); AllEditorGUI.BeginListItem(false, padding); this.CallNextDrawer(entry.Property, null); AllEditorGUI.EndListItem(); AllEditorGUI.EndVerticalList(); } AllEditorGUI.EndIndentedVertical(); }
private void DrawToolbar(ListDrawerConfigInfo info) { AllEditorGUI.BeginHorizontalToolbar(); { // Label if (DragAndDropManager.IsDragInProgress && info.DropZone.IsAccepted == false) { GUIHelper.PushGUIEnabled(false); } if (info.property.ValueEntry.ListLengthChangedFromPrefab) { GUIHelper.PushIsBoldLabel(true); } if (info.listConfig.HideFoldoutWhileEmpty && info.IsEmpty || info.CustomListDrawerOptions.Expanded) { GUILayout.Label(info.label, GUILayoutOptions.ExpandWidth(false)); } else { info.Toggled.Value = AllEditorGUI.Foldout(info.Toggled.Value, info.label ?? GUIContent.none); } if (info.property.ValueEntry.ListLengthChangedFromPrefab) { GUIHelper.PopIsBoldLabel(); } if (info.CustomListDrawerOptions.Expanded) { info.Toggled.Value = true; } if (DragAndDropManager.IsDragInProgress && info.DropZone.IsAccepted == false) { GUIHelper.PopGUIEnabled(); } GUILayout.FlexibleSpace(); // Item Count if (info.CustomListDrawerOptions.ShowItemCountHasValue ? info.CustomListDrawerOptions.ShowItemCount : info.listConfig.ShowItemCount) { if (info.property.ValueEntry.ValueState == PropertyValueState.CollectionLengthConflict) { int maxLength = 0; for (int i = 0; i < info.property.ValueEntry.ValueCount; i++) { maxLength = Math.Max(maxLength, (info.property.ValueEntry.WeakValues[i] as IList <TElement>).Count); } GUILayout.Label(info.Count + " / " + maxLength + " items", EditorStyles.centeredGreyMiniLabel); } else { GUILayout.Label(info.IsEmpty ? "Empty" : info.Count + " items", EditorStyles.centeredGreyMiniLabel); } } bool paging = info.CustomListDrawerOptions.PagingHasValue ? info.CustomListDrawerOptions.ShowPaging : true; bool hidePaging = info.listConfig.HidePagingWhileCollapsed && info.Toggled.Value == false || info.listConfig.HidePagingWhileOnlyOnePage && info.Count <= info.NumberOfItemsPerPage; int numberOfItemsPrPage = Math.Max(1, info.NumberOfItemsPerPage); int numberOfPages = Mathf.CeilToInt(info.Count / (float)numberOfItemsPrPage); int pageIndex = info.Count == 0 ? 0 : (info.StartIndex / numberOfItemsPrPage) % info.Count; // Paging if (paging) { bool disablePaging = paging && !hidePaging && (DragAndDropManager.IsDragInProgress || info.ShowAllWhilePageing || info.Toggled.Value == false); if (disablePaging) { GUIHelper.PushGUIEnabled(false); } if (!hidePaging) { if (pageIndex == 0) { GUIHelper.PushGUIEnabled(false); } if (AllEditorGUI.ToolbarButton(EditorIcons.TriangleLeft, true)) { if (Event.current.button == 0) { info.StartIndex -= numberOfItemsPrPage; } else { info.StartIndex = 0; } } if (pageIndex == 0) { GUIHelper.PopGUIEnabled(); } var userPageIndex = EditorGUILayout.IntField((numberOfPages == 0 ? 0 : (pageIndex + 1)), GUILayoutOptions.Width(10 + numberOfPages.ToString(CultureInfo.InvariantCulture).Length * 10)) - 1; if (pageIndex != userPageIndex) { info.StartIndex = userPageIndex * numberOfItemsPrPage; } GUILayout.Label("/ " + numberOfPages); if (pageIndex == numberOfPages - 1) { GUIHelper.PushGUIEnabled(false); } if (AllEditorGUI.ToolbarButton(EditorIcons.TriangleRight, true)) { if (Event.current.button == 0) { info.StartIndex += numberOfItemsPrPage; } else { info.StartIndex = numberOfItemsPrPage * numberOfPages; } } if (pageIndex == numberOfPages - 1) { GUIHelper.PopGUIEnabled(); } } pageIndex = info.Count == 0 ? 0 : (info.StartIndex / numberOfItemsPrPage) % info.Count; var newStartIndex = Mathf.Clamp(pageIndex * numberOfItemsPrPage, 0, Mathf.Max(0, info.Count - 1)); if (newStartIndex != info.StartIndex) { info.StartIndex = newStartIndex; var newPageIndex = info.Count == 0 ? 0 : (info.StartIndex / numberOfItemsPrPage) % info.Count; if (pageIndex != newPageIndex) { pageIndex = newPageIndex; info.StartIndex = Mathf.Clamp(pageIndex * numberOfItemsPrPage, 0, Mathf.Max(0, info.Count - 1)); } } info.EndIndex = Mathf.Min(info.StartIndex + numberOfItemsPrPage, info.Count); if (disablePaging) { GUIHelper.PopGUIEnabled(); } } else { info.StartIndex = 0; info.EndIndex = info.Count; } if (paging && hidePaging == false && info.listConfig.ShowExpandButton) { if (AllEditorGUI.ToolbarButton(info.ShowAllWhilePageing ? EditorIcons.TriangleUp : EditorIcons.TriangleDown, true)) { info.ShowAllWhilePageing = !info.ShowAllWhilePageing; } } // Add Button if (info.IsReadOnly == false && !info.CustomListDrawerOptions.HideAddButton) { info.ObjectPicker = ObjectPicker <TElement> .GetObjectPicker(info); if (AllEditorGUI.ToolbarButton(EditorIcons.Plus)) { if (info.CustomListDrawerOptions.AlwaysAddDefaultValue) { var objs = new object[info.ListValueChanger.ValueCount]; if (info.property.ValueEntry.SerializationBackend == SerializationBackend.Unity) { for (int i = 0; i < objs.Length; i++) { objs[i] = UnitySerializationUtility.CreateDefaultUnityInitializedObject(typeof(TElement)); } } else { for (int i = 0; i < objs.Length; i++) { objs[i] = default(TElement); } } info.ListValueChanger.AddListElement(objs, "Add default value"); } else if (typeof(TElement).InheritsFrom <UnityEngine.Object>() && Event.current.modifiers == EventModifiers.Control) { info.ListValueChanger.AddListElement(new object[info.ListValueChanger.ValueCount], "Add Unity Null Value"); } else { info.ObjectPicker.ShowObjectPicker( info.property.Info.GetAttribute <AssetsOnlyAttribute>() == null, GUIHelper.GetCurrentLayoutRect(), info.property.ValueEntry.SerializationBackend == SerializationBackend.Unity); } } info.JumpToNextPageOnAdd = paging && (info.Count % numberOfItemsPrPage == 0) && (pageIndex + 1 == numberOfPages); } if (info.OnTitleBarGUI != null) { info.OnTitleBarGUI(info.property.ParentValues[0]); } } AllEditorGUI.EndHorizontalToolbar(); }
private void DrawToolbar(IPropertyValueEntry <TDictionary> entry, Context context) { AllEditorGUI.BeginHorizontalToolbar(); { if (entry.ListLengthChangedFromPrefab) { GUIHelper.PushIsBoldLabel(true); } if (context.Config.HideFoldoutWhileEmpty && context.Paging.ElementCount == 0) { GUILayout.Label(context.Label, GUILayoutOptions.ExpandWidth(false)); } else { context.Toggled.Value = AllEditorGUI.Foldout(context.Toggled.Value, context.Label); } if (entry.ListLengthChangedFromPrefab) { GUIHelper.PopIsBoldLabel(); } GUILayout.FlexibleSpace(); // Item Count if (context.Config.ShowItemCount) { if (entry.ValueState == PropertyValueState.CollectionLengthConflict) { int min = entry.Values.Min(x => x.Count); int max = entry.Values.Max(x => x.Count); GUILayout.Label(min + " / " + max + " items", EditorStyles.centeredGreyMiniLabel); } else { GUILayout.Label(context.Paging.ElementCount == 0 ? "Empty" : context.Paging.ElementCount + " items", EditorStyles.centeredGreyMiniLabel); } } bool hidePaging = context.Config.HidePagingWhileCollapsed && context.Toggled.Value == false || context.Config.HidePagingWhileOnlyOnePage && context.Paging.PageCount == 1; if (!hidePaging) { var wasEnabled = GUI.enabled; bool pagingIsRelevant = context.Paging.IsEnabled && context.Paging.PageCount != 1; GUI.enabled = wasEnabled && pagingIsRelevant && !context.Paging.IsOnFirstPage; if (AllEditorGUI.ToolbarButton(EditorIcons.ArrowLeft, true)) { if (Event.current.button == 0) { context.Paging.CurrentPage--; } else { context.Paging.CurrentPage = 0; } } GUI.enabled = wasEnabled && pagingIsRelevant; var width = GUILayoutOptions.Width(10 + context.Paging.PageCount.ToString().Length * 10); context.Paging.CurrentPage = EditorGUILayout.IntField(context.Paging.CurrentPage + 1, width) - 1; GUILayout.Label(GUIHelper.TempContent("/ " + context.Paging.PageCount)); GUI.enabled = wasEnabled && pagingIsRelevant && !context.Paging.IsOnLastPage; if (AllEditorGUI.ToolbarButton(EditorIcons.ArrowRight, true)) { if (Event.current.button == 0) { context.Paging.CurrentPage++; } else { context.Paging.CurrentPage = context.Paging.PageCount - 1; } } GUI.enabled = wasEnabled && context.Paging.PageCount != 1; if (context.Config.ShowExpandButton) { if (AllEditorGUI.ToolbarButton(context.Paging.IsEnabled ? EditorIcons.ArrowDown : EditorIcons.ArrowUp, true)) { context.Paging.IsEnabled = !context.Paging.IsEnabled; } } GUI.enabled = wasEnabled; } if (!context.DisableAddKey && context.AttrSettings.IsReadOnly != true) { if (AllEditorGUI.ToolbarButton(EditorIcons.Plus)) { context.ShowAddKeyGUI = !context.ShowAddKeyGUI; } } } AllEditorGUI.EndHorizontalToolbar(); }
/// <summary> /// Draws the property. /// </summary> protected override void DrawPropertyLayout(IPropertyValueEntry <InspectorTypeDrawingConfig> entry, GUIContent label) { var searchLabel = entry.Context.Get(this, "searchLabel", (GUIContent)null); var searchText = entry.Context.Get(this, "searchText", ""); var displayType = entry.Context.Get(this, "displayType", DisplayType.AllUnityObjects); var scrollPos = entry.Context.Get(this, "scrollPos", Vector2.zero); //var autoRecompileOnChangesDetected = entry.Property.Tree.GetPropertyAtPath("autoRecompileOnChangesDetected").ValueEntry as IPropertyValueEntry<bool>; //var defaultEditorBehaviour = entry.Property.Tree.GetPropertyAtPath("defaultEditorBehaviour").ValueEntry as PropertyValueEntry<InspectorDefaultEditorBehaviour>; //var processMouseMoveInInspector = entry.Property.Tree.GetPropertyAtPath("processMouseMoveInInspector").ValueEntry as PropertyValueEntry<bool>; if (searchLabel.Value == null) { searchLabel.Value = new GUIContent("Filter"); } //GUILayout.BeginHorizontal(); ////const string autoRecompileString = " Rebuild editors automatically when changes are detected"; ////if (autoRecompileOnChangesDetected.SmartValue) ////{ //// autoRecompileOnChangesDetected.SmartValue = GUILayout.Toggle(autoRecompileOnChangesDetected.SmartValue, autoRecompileString); ////} ////else ////{ //// GUILayout.BeginVertical(); //// { //// autoRecompileOnChangesDetected.SmartValue = GUILayout.Toggle(autoRecompileOnChangesDetected.SmartValue, autoRecompileString); //// AllEditorGUI.WarningMessageBox("Note that with automatic rebuilding disabled, you may get error messages from Unity on startup, stating that inspected types have gone missing. While annoying, this is expected behaviour, and can be safely ignored."); //// } //// GUILayout.EndVertical(); ////} //GUILayout.FlexibleSpace(); //if (GUILayout.Button("Update Editors")) //{ // //AssetDatabase.SaveAssets(); // //AssetDatabase.Refresh(); // //EditorApplication.delayCall += () => EditorCompilation.CompileEditors(GetEditors()); // InspectorConfig.Instance.UpdateOdinEditors(); //} ////if (GUILayout.Button("Recompile Editors")) ////{ //// AssetDatabase.SaveAssets(); //// AssetDatabase.Refresh(); //// EditorApplication.delayCall += () => EditorCompilation.CompileEditors(GetEditors()); ////} //GUILayout.EndHorizontal(); //GUILayout.Space(10); AllEditorGUI.BeginHorizontalToolbar(); GUILayout.Label("Draw ODIN for", GUILayoutOptions.ExpandWidth(false)); GUILayout.FlexibleSpace(); AllEditorGUI.VerticalLineSeparator(); GUI.changed = false; searchText.Value = AllEditorGUI.ToolbarSearchField(searchText.Value, true); if (GUI.changed) { UpdateRootGroupsSearch(searchText.Value, displayType.Value); } if (AllEditorGUI.ToolbarButton(new GUIContent(" Reset to default "))) { var asset = InspectorConfig.Instance; if (EditorUtility.DisplayDialog("Reset " + asset.name + " to default", "Are you sure you want to reset all settings on " + asset.name + " to default values? This cannot be undone.", "Yes", "No")) { AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(asset)); AssetDatabase.Refresh(); UnityEngine.Object.DestroyImmediate(asset); } } AllEditorGUI.EndHorizontalToolbar(); AllEditorGUI.BeginVerticalList(true, false, GUILayoutOptions.ExpandHeight(false)); { scrollPos.Value = EditorGUILayout.BeginScrollView(scrollPos.Value, GUILayoutOptions.ExpandWidth(true)); { DrawRootTypeGroup(InspectorDefaultEditors.UserTypes, entry, searchText.Value); DrawRootTypeGroup(InspectorDefaultEditors.PluginTypes, entry, searchText.Value); DrawRootTypeGroup(InspectorDefaultEditors.UnityTypes, entry, searchText.Value); DrawRootTypeGroup(InspectorDefaultEditors.OtherTypes, entry, searchText.Value); } EditorGUILayout.EndScrollView(); } AllEditorGUI.EndVerticalList(); }