Version 3.3.1.2

DrawerPriorityAttribute class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
[AttributeUsage(AttributeTargets.Class)]
public class DrawerPriorityAttribute : Attribute, _Attribute

DrawerPriority is used on inspector drawers and indicates the priority of the drawer.

Use this to make your custom drawer to come before or after other drawers, and potentially hide other drawers.

Inheritance
  • System.Object
  • System.Attribute
  • DrawerPriorityAttribute
Example

The following example shows how DrawerPriority could be apply to a value drawer.

[DrawerPriority(DrawerPriorityLevel.ValuePriority)]

public sealed class MyIntDrawer : InspectorValuePropertyDrawer<int>
{
	// ...
}
Example

The following example shows how DrawerPriority is used to mark a custom int drawer as a high priority drawer.

[DrawerPriority(1, 0, 0)]

public sealed class MySpecialIntDrawer : InspectorValuePropertyDrawer<int>
{
	// ...
}

Constructors

DrawerPriorityAttribute(DrawerPriorityLevel)
Indicates the priority of an inspector drawer.
public DrawerPriorityAttribute(DrawerPriorityLevel priority)
Parameters
DrawerPriorityLevel priority

Option for priority for the inspector drawer.

DrawerPriorityAttribute(Double, Double, Double)
Indicates the priority of an inspector drawer.
public DrawerPriorityAttribute(double super = 0, double wrapper = 0, double value = 0)
Parameters
System.Double super

The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. These drawers typically don't draw the property itself, and calls CallNextDrawer.

System.Double wrapper

The wrapper priority. Mostly used by drawers used to decorate properties.

System.Double value

The value priority. Mostly used by OdinValueDrawer<T>s and OdinAttributeDrawer<TAttribute, TValue>s.

Properties

Priority
The priority of the drawer.
public DrawerPriority Priority { get; }