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'.
public GeneralDrawerConfig()
[TabGroup("Polymorphic Fields", false, 0F)]
[EnumToggleButtons]
[LabelText("How To Handle Non Default Constructors")]
[PropertyOrder(12F)]
public NonDefaultConstructorPreference nonDefaultConstructorPreference
[VerticalGroup("_DefaultTabGroup/Type Selector/GeneralGroup", 0F)]
[PropertyOrder(10F)]
public bool preferNamespacesOverAssemblyCategories
[TabGroup("Polymorphic Fields", false, 0F)]
[Title("General", null, TitleAlignments.Left, true, true)]
[PropertyOrder(12F)]
public bool showBaseType
[VerticalGroup("_DefaultTabGroup/Type Selector/GeneralGroup", 0F)]
[PropertyOrder(10F)]
public bool showCategoriesByDefault
[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
[TabGroup("Type Selector", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
[PropertyOrder(10F)]
public bool useNewObjectSelector
[TabGroup("Polymorphic Fields", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
[PropertyOrder(10F)]
public bool useOldPolymorphicField
[TabGroup("Type Selector", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
[PropertyOrder(10F)]
public bool useOldTypeSelector
[PropertyOrder(9F)]
[TabGroup("Object Fields", false, 0F)]
[Title("Backwards Compatibility", null, TitleAlignments.Left, true, true)]
public bool useOldUnityObjectField
[PropertyOrder(9F)]
[TabGroup("Object Fields", false, 0F)]
public bool useOldUnityPreviewField
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[PropertyRange(0, 1)]
[EnableIf("@!StretchButtons")]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
public float ButtonAlignment { get; set; }
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[CustomValueDrawer("DrawButtonHeight")]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
public int ButtonHeight { get; set; }
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
[EnumToggleButtons]
public IconAlignment ButtonIconAlignment { get; set; }
[TabGroup("Enums", false, 0F)]
[ShowInInspector]
[EnableIf("UseImprovedEnumDropDown")]
public bool DrawEnumTypeTitle { get; set; }
[TabGroup("General", false, 0F)]
[ShowInInspector]
[DelayedProperty]
[PropertyTooltip("Enables Odin smart fields in the inspector.")]
[MinValue(1)]
[MaxValue(100)]
public bool EnableSmartNumberFields { get; set; }
[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; }
[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; }
[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; }
[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; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
public bool HidePagingWhileOnlyOnePage { get; set; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of even list elements when in the dark skin.")]
public Color ListItemColorEvenDarkSkin { get; set; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of even list elements when in the light skin.")]
public Color ListItemColorEvenLightSkin { get; set; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of odd list elements when in the dark skin.")]
public Color ListItemColorOddDarkSkin { get; set; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the color of odd list elements when in the light skin.")]
public Color ListItemColorOddLightSkin { get; set; }
[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; }
[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; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not lists should be expanded or collapsed by default.")]
public bool OpenListsByDefault { get; set; }
[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; }
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; }
[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; }
[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; }
[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; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not lists should show item count.")]
public bool ShowIndexLabels { get; set; }
[TabGroup("Collections", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not lists should show item count.")]
public bool ShowItemCount { get; set; }
[TabGroup("General", false, 0F)]
[ShowInInspector]
[PropertyTooltip("Specify whether or not the script selector above components should be drawn")]
public bool ShowMonoScriptInEditor { get; set; }
[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; }
[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; }
[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; }
[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; }
[TabGroup("Object Fields", false, 0F)]
[ShowInInspector]
[EnumToggleButtons]
public ObjectFieldAlignment SquareUnityObjectAlignment { get; set; }
[LabelText("Enable Globally For")]
[TabGroup("Object Fields", false, 0F)]
[ShowInInspector]
public GeneralDrawerConfig.UnityObjectType SquareUnityObjectEnableFor { get; set; }
[TabGroup("Object Fields", false, 0F)]
[ShowInInspector]
public float SquareUnityObjectFieldHeight { get; set; }
[TabGroup("Buttons", false, 0F)]
[ShowInInspector]
[OnValueChanged("@$property.Parent.Children[\"#Preview\"].RefreshSetup()", false)]
public bool StretchButtons { get; set; }
[TabGroup("Animations", false, 0F)]
[ShowInInspector]
[PropertyRange(0.0010000000474974513, 4)]
public float TabPageSlideAnimationDuration { get; set; }
[TabGroup("Enums", false, 0F)]
[ShowInInspector]
public bool UseImprovedEnumDropDown { get; set; }
[Button(ButtonSizes.Large)]
[PropertyOrder(1000F)]
public void ResetToDefault()
[VerticalGroup("_DefaultTabGroup/Type Selector/GeneralGroup", 0F)]
[Button("Customize", ButtonSizes.Large)]
[PropertyOrder(10F)]
public void ShowTypeRegistryUserConfig()