public sealed class TargetOverrideMatrixThe per-target import settings, as a grid of settings against build targets.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Doc 08's overrides block, drawn. A row is one setting, a column is one target, and the leftmost column is the base every target starts from. That orientation is the one that answers the question people actually have — "which platforms disagree about compression" is read across a row — and it is why this is a grid rather than a group per target.
The cells are the inspector's own drawers. The matrix knows what a member is and nothing about what an enum, a bool or an int looks like; a cell is an InspectorField over one target's settings object and whatever DrawerRegistry resolves for it. So a setting added to an importer appears here with its right editor, and a custom drawer a plugin registers works in the matrix without knowing the matrix exists.
⚠ An unticked cell is still an editor, and it is still live. It shows the value the target will build with, which is the base's — so ticking a box and typing is two actions rather than three, and untying them would mean a column of blanks whose meaning is "look left". Typing into an unticked cell writes the row's own object and does nothing to the build until the box is ticked, which is the same shape as every override editor that has this problem.
⚠ Rebuilt whenever the rows change, and only then. OverridesChanged is raised for a target appearing or a tick moving; an ordinary value edit is not one, because a grid that rebuilt itself on every keystroke would take the focus out of the field being typed into.
Fields and properties (8)
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 UiElement BodyWhere the header and the setting rows go.
public TextBox TargetNameThe field a new target's name is typed into.
public Button AddTargetThe button that adds the typed target.
public EmptyState EmptyShown instead of the grid when the settings type has nothing to override.
public IReadOnlyList<OverrideCell> CellsEvery cell in the grid, in row-major order.
Methods (4)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public void Show(ImportSettingsDocument settings)Shows a document's overrides.
public void Rebuild()Rebuilds the grid from the document as it stands.
public void Reload()Reads every cell back from the objects behind it, without rebuilding.
Used by (2)
- ImportSettingsViewVixen.Editor.AssetEditors
- ImportViewTestsVixen.Editor.AssetEditors.Tests