public sealed class InspectorViewThe inspector: editors generated from what a type's attributes say about it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Everything it draws came from a generator. The member list, the attribute metadata and the accessors are compile-time facts registered by module initializers — no reflection pass, no assembly scan, and a member that could not be described was a build warning rather than a row that quietly never appears.
Several targets at once, which is what an inspector is for. Selecting twenty objects and setting one field on all of them is the operation; showing the first one's values and silently editing only that is the bug. Where the targets disagree the editors say so, and typing into one writes to every one of them — Read and Write are where that lives, so a third-party drawer gets it for free.
Every edit is an IEditorCommand on the document's stack, produced by the field rather than by the drawer, so undo works without per-drawer effort and a drawer that wrote a member directly is a visible mistake rather than an invisible one.
Fields and properties (18)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public DrawerRegistry DrawersWhich drawer edits which member.
public PropertyClipboard ClipboardWhere copy-property puts things.
public EditorDocument? EditedDocumentWhere edits are recorded.
public IEditorRegistry ExtensionsWhere the panel looks for a hand-written inspector to use instead of the rows.
public EditTarget? EditedWhat is being edited, as the pipeline sees it, or for nothing.
public IPrefabSource? PrefabWhat the inspected objects were made from, for override marks and revert.
public UiElement HeaderThe strip above the rows: the search box and the lock.
public SearchBox SearchThe search box above the rows.
public ToggleButton LockHolds the inspector on what it is showing while the selection moves on.
public ScrollView ScrollThe region the rows scroll in.
public UiElement BodyWhere the rows go.
public EmptyState EmptyShown instead of the rows when the selection has nothing in common.
public IReadOnlyList<object> TargetsWhat is being inspected.
public IReadOnlyList<InspectorRow> RowsThe rows, in order.
public InspectorDescriptor? DescriptorThe type every target has in common, if they have one.
public bool IsLockedWhether the inspector is held on what it is showing.
Events (2)
public Action<InspectorView, InspectorMember>? ValueChangedRaised after an editor writes a member.
public Action<InspectorView>? LockChangedRaised when the lock is turned on or off.
Methods (9)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public void Inspect(params ReadOnlySpan<object> objects)Shows the members of some objects.
public void Clear()Shows nothing.
public void Reload()Reads every editor back from the objects, without rebuilding anything.
public bool Copy(InspectorRow row)Copies a row's value.
public bool Paste(InspectorRow row)Pastes into a row.
public bool Reset(InspectorRow row)Puts a row back to its type's default.
public bool RevertToPrefab(InspectorRow row)Puts a row back to the prefab's value.
public ContextMenu Contextualise()Puts a Copy / Paste / Reset / Revert menu on the rows.
Used by (17)
- AddressableGroupsViewVixen.Editor.AssetEditors
- DeclaredContributionTestsVixen.Editor.App.Tests
- EditorAffordanceTestsVixen.Editor.App.Tests
- EditorApplicationVixen.Editor.App
- EditorSessionVixen.Editor.Testing
- ImportSettingsViewVixen.Editor.AssetEditors
- InspectorFixtureVixen.Editor.Inspector.Tests
- InspectorPanelTestsVixen.Editor.App.Tests
- MaterialViewVixen.Editor.AssetEditors
- OneEditPathTestsVixen.Editor.App.Tests
- OutOfTreePluginTestsVixen.Editor.App.Tests
- PanelTestsVixen.Editor.Inspector.Tests
- ScenarioTestsVixen.Editor.App.Tests
- SelectionTestsVixen.Editor.App.Tests
- TerrainModuleVixen.Editor.Terrain
- TextureImportViewVixen.Editor.AssetEditors
- ThemeTestsVixen.Editor.Inspector.Tests