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.
The following example shows how DrawerPriority could be apply to a value drawer.
[DrawerPriority(DrawerPriorityLevel.ValuePriority)]
public sealed class MyIntDrawer : InspectorValuePropertyDrawer<int>
{
// ...
}
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>
{
// ...
}
public DrawerPriorityAttribute(DrawerPriorityLevel priority)
DrawerPriorityLevel | priority | Option for priority for the inspector drawer. |
public DrawerPriorityAttribute(double super = 0, double wrapper = 0, double value = 0)
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. |
public DrawerPriority Priority { get; }