Vixen
02b45cc4
csharp
public readonly record struct EditValue

What a member holds across a selection: one value, or the fact that they disagree.

Read the guide page for this →

Remarks

⚠ Disagreement is a state, not an average. Twenty objects with three different values must not show one of them as though it were the answer — the user would change something else and never know it happened.

Here rather than in the inspector, which is where it was written. Mixed is not an inspector concept: a gizmo holding twenty objects at different rotations, a graph editor with two nodes selected and a settings page over two build profiles all have the same question to answer. It moved down so that every editing surface answers it the same way instead of each one deciding afresh what to show.

Fields and properties (3)

  • public object? Value

    The value they share, or when they do not.

  • public bool IsMixed

    Whether the selected objects hold different values.

  • public static EditValue None

    What a property with no objects behind it reads as.

Methods (2)

  • public EditValue(object? Value, bool IsMixed)

    What a member holds across a selection: one value, or the fact that they disagree.

  • public T Or<T>(T fallback)

    The value if they agree, or a fallback if they do not.

Used by (6)

  • EditPipelineTestsVixen.Editor.Core.Tests
  • EditPropertyVixen.Editor.Core
  • EditingTestsVixen.Editor.Inspector.Tests
  • MarkupBindingVixen.Editor.Inspector
  • OneEditPathTestsVixen.Editor.App.Tests
  • OptionalDrawerVixen.Editor.Inspector