public interface IPropertyDrawerTurns one member into controls, and controls back into a value.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two methods, and the split is the whole design. Build runs once and makes the elements; Show runs whenever the value may have changed and puts numbers into elements that already exist. A gizmo dragging an object calls the second one forty times a second, and a drawer that rebuilt would take the focus out of whatever the user was typing into.
A drawer never touches an undo stack. It calls Write and Seal, which is what makes "every edit produces a command" true by construction rather than by every drawer remembering to do it.
Methods (3)
bool CanDraw(InspectorMember member)Whether this drawer can edit a member.
UiElement Build(InspectorField field, UiElement parent)Makes the controls, once.
void Show(InspectorField field, UiElement editor)Puts the current value into controls that already exist.
Used by (18)
- AssetDrawerVixen.Editor.Inspector
- ComponentDrawerVixen.Editor.Inspector
- DeclaredContributionsVixen.Editor.App
- DrawerRegistryVixen.Editor.Inspector
- DrawerTestsVixen.Editor.Inspector.Tests
- EnumDrawerVixen.Editor.Inspector
- InspectorRowVixen.Editor.Inspector
- InspectorRowsVixen.Editor.Inspector
- ListDrawerVixen.Editor.Inspector
- NestedDrawerVixen.Editor.Inspector
- NumberDrawerVixen.Editor.Inspector
- OptionalDrawerVixen.Editor.Inspector
- OptionalEditorVixen.Editor.Inspector
- OutOfTreePluginTestsVixen.Editor.App.Tests
- OverrideCellVixen.Editor.AssetEditors
- PropertyDrawerVixen.Editor.Inspector
- ReadOnlyDrawerVixen.Editor.Inspector
- TargetOverrideMatrixVixen.Editor.AssetEditors