Version 3.3.1.2

GeneralDrawerConfig class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
[SirenixEditorConfig]
[Searchable]
[OnStateUpdate("@this.GotoTargetTabName(#(#_DefaultTabGroup))")]
public class GeneralDrawerConfig : GlobalConfig<GeneralDrawerConfig>, IGlobalConfigEvents

Contains general configuration for all Odin drawers.

You can modify the configuration in the Odin Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Drawers -> General', or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/GeneralDrawerConfig'.

Inheritance

Constructors

GeneralDrawerConfig()
public GeneralDrawerConfig()

Fields

nonDefaultConstructorPreference
[TabGroup("Polymorphic Fields", false, 0F)]
[EnumToggleButtons]
[LabelText("How To Handle Non Default Constructors")]
[PropertyOrder(12F)]
public NonDefaultConstructorPreference nonDefaultConstructorPreference
preferNamespacesOverAssemblyCategories
[VerticalGroup("_DefaultTabGroup/Type Selector/GeneralGroup", 0F)]
[PropertyOrder(10F)]
public bool preferNamespacesOverAssemblyCategories
showBaseType
[TabGroup("Polymorphic Fields", false, 0F)]
[Title("General", null, TitleAlignments.Left, true, true)]
[PropertyOrder(12F)]
public bool showBaseType
showCategoriesByDefault
[VerticalGroup("_DefaultTabGroup/Type Selector/GeneralGroup", 0F)]
[PropertyOrder(10F)]
public bool showCategoriesByDefault
showNoneItem
[TabGroup("Type Selector", false, 0F)]
[VerticalGroup("_DefaultTabGroup/Type Selector/GeneralGroup", 0F)]
[Title("General", null, TitleAlignments.Left, true, true)]
[LabelText("Show '<none>' Item In The Selector")]
[PropertyOrder(10F)]
public bool showNoneItem
useNewObjectSelector
[TabGroup("Type Selector", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
[PropertyOrder(10F)]
public bool useNewObjectSelector
useOldPolymorphicField
[TabGroup("Polymorphic Fields", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
[PropertyOrder(10F)]
public bool useOldPolymorphicField
useOldTypeSelector
[TabGroup("Type Selector", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
[PropertyOrder(10F)]
public bool useOldTypeSelector
useOldUnityObjectField
[PropertyOrder(9F)]
[TabGroup("Object Fields", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
public bool useOldUnityObjectField
useOldUnityPreviewField
[PropertyOrder(9F)]
[TabGroup("Object Fields", false, 0F)]
public bool useOldUnityPreviewField

Properties

ButtonAlignment
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[PropertyRange(0, 1)]
[EnableIf("@!StretchButtons")]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
public float ButtonAlignment { get; set; }
ButtonHeight
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[CustomValueDrawer("DrawButtonHeight")]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
public int ButtonHeight { get; set; }
ButtonIconAlignment
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
[EnumToggleButtons]
public IconAlignment ButtonIconAlignment { get; set; }
DrawEnumTypeTitle
Gets or sets a value indicating whether [use improved enum drop down].
[TabGroup("Enums", false, 0F)]
[ShowInInspector]
[EnableIf("UseImprovedEnumDropDown")]
public bool DrawEnumTypeTitle { get; set; }
EnableSmartNumberFields
[TabGroup("General", false, 0F)]
[ShowInInspector]
[DelayedProperty]
[PropertyTooltip("Enables Odin smart fields in the inspector.")]
[MinValue(1)]
[MaxValue(100)]
public bool EnableSmartNumberFields { get; set; }
EnableUIToolkitSupport
Specify whether or not the script selector above components should be drawn.
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not the UI toolkit support feature should be enabled or not. Note that the DrawWithVisualElements attribute will still work (in Unity 2020.2+) if this is disabled.")]
[EnableIf("AllowUIToolkitSupport")]
[SuffixLabel("$AllowUIToolkitSupportSuffix", false)]
public bool EnableUIToolkitSupport { get; set; }
ExpandFoldoutByDefault
If set to true, most foldouts throughout the inspector will be expanded by default.
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("If set to true, most foldouts throughout the inspector will be expanded by default.")]
public bool ExpandFoldoutByDefault { get; set; }
GUIFoldoutAnimationDuration
Specify the animation speed for most foldouts throughout the inspector.
[TabGroup("Animations", false, 0F)]
[ShowInInspector]
[PropertyRange(0.0010000000474974513, 4)]
[PropertyTooltip("Specify the animation speed for most foldouts throughout the inspector.")]
public float GUIFoldoutAnimationDuration { get; set; }
HidePagingWhileCollapsed
Specify whether or not lists should hide the paging buttons when the list is collapsed.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not lists should hide the paging buttons when the list is collapsed.")]
public bool HidePagingWhileCollapsed { get; set; }
HidePagingWhileOnlyOnePage
Specify whether or not lists should hide the paging buttons when there is only one page.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
public bool HidePagingWhileOnlyOnePage { get; set; }
ListItemColorEvenDarkSkin
Specify the color of even list elements when in the dark skin.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of even list elements when in the dark skin.")]
public Color ListItemColorEvenDarkSkin { get; set; }
ListItemColorEvenLightSkin
Specify the color of even list elements when in the light skin.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of even list elements when in the light skin.")]
public Color ListItemColorEvenLightSkin { get; set; }
ListItemColorOddDarkSkin
Specify the color of odd list elements when in the dark skin.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of odd list elements when in the dark skin.")]
public Color ListItemColorOddDarkSkin { get; set; }
ListItemColorOddLightSkin
Specify the color of odd list elements when in the light skin.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of odd list elements when in the light skin.")]
public Color ListItemColorOddLightSkin { get; set; }
MaxRecursiveDrawDepth
Specifies the maximum depth to which a property can draw itself recursively before the system refuses to draw it any deeper.
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specifies the maximum depth to which a property can draw itself recursively before the system refuses to draw it any deeper.")]
[MinValue(1)]
[MaxValue(100)]
public int MaxRecursiveDrawDepth { get; set; }
NumberOfItemsPrPage
Specify the number of elements drawn per page.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[OnValueChanged("ResizeExampleList", false)]
[MaxValue(500)]
[MinValue(2)]
[PropertyTooltip("Specify the number of elements drawn per page.")]
[LabelText("Number Of Items Per Page")]
public int NumberOfItemsPrPage { get; set; }
OpenListsByDefault
Specify whether or not lists should be expanded or collapsed by default.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not lists should be expanded or collapsed by default.")]
public bool OpenListsByDefault { get; set; }
QuaternionDrawMode
Specify how the Quaternion struct should be shown in the inspector.
[TabGroup("Structs", false, 0F)]
[ShowInInspector]
[EnumToggleButtons]
[PropertyTooltip("Current mode for how quaternions are edited in the inspector.\n\nEuler: Rotations as yaw, pitch and roll.\n\nAngle axis: Rotations as a axis of rotation, and an angle of rotation around that axis.\n\nRaw: Directly edit the x, y, z and w components of a quaternion.")]
public QuaternionDrawMode QuaternionDrawMode { get; set; }
ResponsiveVectorComponentFields
When true the component labels, for vector fields, will be hidden when the field is too narrow.
[TabGroup("Structs", false, 0F)]
[ShowInInspector]
[PropertyTooltip("When on the component labels, for vector fields, will be hidden when the field is too narrow.\nThis allows more space for the actual component fields themselves.")]
public bool ResponsiveVectorComponentFields { get; set; }
ShakingAnimationDuration
Specify the shaking duration for most shaking animations throughout the inspector.
[TabGroup("Animations", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the shaking duration for most shaking animations throughout the inspector.")]
[PropertyRange(0, 4)]
public float ShakingAnimationDuration { get; set; }
ShowButtonResultsByDefault
If set to true, buttons will show the result values from invoking them in the inspector by default.
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("If set to true, buttons will show the result values from invoking them in the inspector by default.")]
public bool ShowButtonResultsByDefault { get; set; }
ShowExpandButton
Specify whether or not to include a button which expands the list, showing all pages at once.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not to include a button which expands the list, showing all pages at once")]
public bool ShowExpandButton { get; set; }
ShowIndexLabels
Specify whether or not lists should show item count.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not lists should show item count.")]
public bool ShowIndexLabels { get; set; }
ShowItemCount
Specify whether or not lists should show item count.
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not lists should show item count.")]
public bool ShowItemCount { get; set; }
ShowMonoScriptInEditor
Specify whether or not the script selector above components should be drawn.
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not the script selector above components should be drawn")]
public bool ShowMonoScriptInEditor { get; set; }
ShowPagingInTables
Specify whether or not a list should hide the foldout triangle when the list is empty.
[InfoBox("All collection settings - and more - can be overridden for individual collections using the ListDrawerSettings attribute.", InfoMessageType.Info, null)]
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specifies whether all tables should include paging, or if the entirety of the table should be drawn as a list.")]
public bool ShowPagingInTables { get; set; }
ShowPrefabModificationsDisabledMessage
Specify whether or not the warning for properties that do not support prefab modifications should be shown in the inspector.
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not the warning for properties that do not support prefab modifications should be shown in the inspector")]
public bool ShowPrefabModificationsDisabledMessage { get; set; }
ShowPrefabModifiedValueBar
Specify whether or not the warning for properties that do not support prefab modifications should be shown in the inspector.
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not a blue bar should be drawn next to modified prefab values")]
[LabelText("Show Blue Prefab Value Modified Bar")]
public bool ShowPrefabModifiedValueBar { get; set; }
SmartFieldHistoryLength
[TabGroup("General", false, 0F)]
[ShowInInspector]
[DelayedProperty]
[PropertyTooltip("Specifies the number of expressions to keep for smart field history.")]
[MinValue(1)]
[MaxValue(100)]
public int SmartFieldHistoryLength { get; set; }
SquareUnityObjectAlignment
Gets or sets the default alignment of the preview object field.
[TabGroup("Object Fields", false, 0F)]
[ShowInInspector]
[EnumToggleButtons]
public ObjectFieldAlignment SquareUnityObjectAlignment { get; set; }
SquareUnityObjectEnableFor
Gets or sets which types should be drawn by default by the preview object field.
[LabelText("Enable Globally For")]
[TabGroup("Object Fields", false, 0F)]
[ShowInInspector]
public GeneralDrawerConfig.UnityObjectType SquareUnityObjectEnableFor { get; set; }
SquareUnityObjectFieldHeight
Gets or sets the default size of the preview object field.
[TabGroup("Object Fields", false, 0F)]
[ShowInInspector]
public float SquareUnityObjectFieldHeight { get; set; }
StretchButtons
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
public bool StretchButtons { get; set; }
TabPageSlideAnimationDuration
Specify the animation speed for TabGroupAttribute
[TabGroup("Animations", false, 0F)]
[ShowInInspector]
[PropertyRange(0.0010000000474974513, 4)]
public float TabPageSlideAnimationDuration { get; set; }
UseImprovedEnumDropDown
Gets or sets a value indicating whether [use improved enum drop down].
[TabGroup("Enums", false, 0F)]
[ShowInInspector]
public bool UseImprovedEnumDropDown { get; set; }

Methods

ResetToDefault()
Resets all settings to default.
[Button(ButtonSizes.Large)]
[PropertyOrder(1000F)]
public void ResetToDefault()
ShowTypeRegistryUserConfig()
[VerticalGroup("_DefaultTabGroup/Type Selector/GeneralGroup", 0F)]
[Button("Customize", ButtonSizes.Large)]
[PropertyOrder(10F)]
public void ShowTypeRegistryUserConfig()