Vixen
02b45cc4
csharp
public sealed class CustomDrawerAttribute

Marks a property drawer as the one for a member's type, or for an attribute on it.

Read the guide page for this →

As a annotation

Valid on
Class

Remarks

Doc 36 § D3. The class implements IPropertyDrawer and needs a parameterless constructor — it is made by the editor, once, and registered into the DrawerRegistry the host published.

[CustomDrawer(typeof(Curve))] public sealed class CurveDrawer : IPropertyDrawer { … }

⚠ A type or an attribute, because DrawerRegistry resolves both and the difference is not cosmetic. By type is "every Curve is drawn like this"; by attribute is "every member carrying [ColorUsage] is", which is how one drawer serves a member's *intent* rather than its storage. ForAttribute says which of the two Target means.

Fields and properties (2)

  • public Type Target

    What it is registered against.

  • public bool ForAttribute

    Whether Target is an attribute to match rather than a member type.

Methods (1)

  • public CustomDrawerAttribute(Type target)

    Marks a property drawer as the one for a member's type, or for an attribute on it.

Used by (1)

  • DeclaredContributionsVixen.Editor.App