public class EditPropertyOne member bound to the objects being edited: read it, write it, undo it.
Remarks
The single edit path doc 36 § D1 asks for. Every editing surface — the inspector, a graph editor, a settings page, a plugin's own panel — writes through one of these, and gets undo, multi-object editing, mixed-value reporting and change notification without any of them implementing those four again. An editor that has five of these has five answers to "what happens when twenty things are selected", which is how the editor got five of them.
⚠ Not to be confused with EditorProperty`1. That is a signal on one object, part of the document model, and it is what a SceneDocument's own fields are. This is a binding: one member, N objects, no storage of its own. They meet at the command stack and nowhere else.
Every write goes through the document's command stack, which is the whole reason this type sits between a control and a member. A property with no document writes directly and is not undoable; that is the case where something is being previewed rather than edited — a material thumbnail, a fixture in a test — and the alternatives are refusing to draw it or manufacturing a document for it.
Fields and properties (5)
public IEditMember MemberThe member being edited.
public IReadOnlyList<object> ObjectsWhat it is being edited on, in selection order.
public EditorDocument? DocumentWhere the writes are recorded, if anywhere.
public virtual bool CanWriteWhether this member will be written at all.
protected virtual IReadOnlyList<object> ReachedWhich of Objects a write actually reaches.
Events (1)
public Action<EditProperty>? ChangedRaised after a write of any kind lands.
Methods (7)
public EditProperty(IEditMember member, IReadOnlyList<object> objects, EditorDocument? document = null)Binds a member to a selection.
public EditValue Read()Reads the member off every object.
public bool Write(object? value)Writes the member on every object it reaches, undoably.
public bool WriteEach(IReadOnlyList<object?> values)Writes a different value to each object, as one undo step.
public IDisposable Refreshing()Holds off writes while a control is being filled in from the model.
public void Seal()Ends the run of edits that were collapsing into one undo entry.
protected bool Apply(IReadOnlyList<object> reached, object? value)Records the edit on the document's stack, or writes straight through when there is none.
Used by (39)
- AssetDrawerVixen.Editor.Inspector
- AssetFieldDropVixen.Editor.App
- AssetPickerVixen.Editor.App
- BehaviorAuthoringTestsVixen.Editor.App.Tests
- BooleanDrawerVixen.Editor.Inspector
- BrushInspectorMarkupTestsVixen.Editor.Terrain.Tests
- Color3DrawerVixen.Editor.Inspector
- ColorDrawerVixen.Editor.Inspector
- ComponentDrawerVixen.Editor.Inspector
- ComponentTestsVixen.Editor.App.Tests
- ComponentsViewVixen.Editor.App
- CompositeTestsVixen.Editor.Inspector.Tests
- CurveDrawerVixen.Editor.Inspector
- DrawerTestsVixen.Editor.Inspector.Tests
- EditPipelineTestsVixen.Editor.Core.Tests
- EditTargetVixen.Editor.Core
- EditingTestsVixen.Editor.Inspector.Tests
- EnumDrawerVixen.Editor.Inspector
- InspectorFieldVixen.Editor.Inspector
- InspectorRowsVixen.Editor.Inspector
- InspectorTargetVixen.Editor.Inspector
- InspectorViewVixen.Editor.Inspector
- ListDrawerVixen.Editor.Inspector
- MarkupBindingVixen.Editor.Inspector
- MarkupBindingTestsVixen.Editor.Inspector.Tests
- MultilineDrawerVixen.Editor.Inspector
- NestedDrawerVixen.Editor.Inspector
- NumberDrawerVixen.Editor.Inspector
- OneEditPathTestsVixen.Editor.App.Tests
- OptionalDrawerVixen.Editor.Inspector
- PanelTestsVixen.Editor.Inspector.Tests
- PropertyClipboardVixen.Editor.Inspector
- PropertyDrawerVixen.Editor.Inspector
- ReadOnlyDrawerVixen.Editor.Inspector
- RefreshScopeVixen.Editor.Core
- ScenarioTestsVixen.Editor.App.Tests
- SettingsWindowTestsVixen.Editor.App.Tests
- StringDrawerVixen.Editor.Inspector
- TargetOverrideMatrixVixen.Editor.AssetEditors