public readonly record struct MemberPresentationHow a member should be presented, and what it will accept.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ default(MemberPresentation) is not the same thing as new MemberPresentation() would be in a class, and the difference bites exactly once per person. This is a struct, so both spellings give the all-zero value — which means IsEditorVisible comes out false despite the parameter above defaulting to true. A member handed a defaulted presentation is therefore hidden from the inspector, silently.
The generator never trips over it — it writes every field it means — and a hand-written descriptor should pass new MemberPresentation(IsEditorVisible: true) rather than relying on the parameter default. Said here rather than fixed by inverting the flag, because IsEditorHidden would read backwards everywhere it is used to spare one caller a surprise they only get once.
AllowsNull is the second flag with that shape and it is deliberately not a second surprise: it only means anything alongside an AssetType, and a descriptor stating one states the other in the same breath.
Fields and properties (11)
public string? CategoryWhich group the inspector puts it in.
public string? DisplayNameWhat the inspector calls it, or for its name.
public string? TooltipWhat the inspector says about it.
public double? MinimumThe low end of its range, if it has one.
public double? MaximumThe high end of its range, if it has one.
public double StepHow far one nudge moves it.
public bool LogarithmicWhether the slider should be logarithmic.
public bool IsEditorVisibleWhether the inspector shows it at all.
public bool IsEditorReadOnlyWhether the inspector shows it without letting it be changed.
public Type? AssetTypeWhat kind of asset it names, if it names one.
public bool AllowsNullWhether it may name nothing at all.
Methods (1)
public MemberPresentation(string? Category = null, string? DisplayName = null, string? Tooltip = null, double? Minimum = null, double? Maximum = null, double Step = 0, bool Logarithmic = false, bool IsEditorVisible = true, bool IsEditorReadOnly = false, Type? AssetType = null, bool AllowsNull = true)How a member should be presented, and what it will accept.
Used by (9)
- MaterialHelloUi
- MemberDescriptorVixen.Core.Reflection
- NestedMemberTestsVixen.Ui.Controls.Advanced.Tests
- PropertyGridVixen.Ui.Controls.Advanced
- PropertyGridTestsVixen.Ui.Controls.Advanced.Tests
- TypeRegistryTestsVixen.Core.Reflection.Tests
- ReflectedDescriptorVixen.Editor.Inspector
- ReflectedMemberVixen.Editor.Inspector
- ReflectedTypesVixen.Editor.Scripts