Class TypeSelectorDisplayAttribute
Namespace: Aspid.FastTools.Types
Assembly: Aspid.FastTools.dll
Supplies presentation metadata for a type in the type-selector window — display name, group, tooltip and
icon — or keeps the type out of the picker entirely with TypeSelectorDisplayAttribute.Hidden.
[Conditional("UNITY_EDITOR")]
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Interface, Inherited = false)]
public sealed class TypeSelectorDisplayAttribute : Attribute
Inheritance
object ← Attribute ← TypeSelectorDisplayAttribute
Extension Methods
TextInputBaseFieldTextSelectionExtensions.AddOnCursorIndexChange<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, Action), TextInputBaseFieldTextSelectionExtensions.AddOnSelectIndexChange<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, Action), INotifyValueChangedExtensions.AddValueChanged<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, EventCallback<ChangeEvent<TValue>>), ProfilerMarkerExtensionsForGenerator.Marker<TypeSelectorDisplayAttribute>(TypeSelectorDisplayAttribute), TextInputBaseFieldTextSelectionExtensions.RemoveOnCursorIndexChange<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, Action), TextInputBaseFieldTextSelectionExtensions.RemoveOnSelectIndexChange<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, Action), INotifyValueChangedExtensions.RemoveValueChanged<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, EventCallback<ChangeEvent<TValue>>), TextInputBaseFieldExtensions.SetAutoCorrection<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldTextSelectionExtensions.SetCursorIndex<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, int), TextInputBaseFieldExtensions.SetDelayed<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldTextSelectionExtensions.SetDoubleClickSelectsWord<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldExtensions.SetHideMobileInput<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldExtensions.SetHidePlaceholderOnFocus<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldExtensions.SetHideSoftKeyboard<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), SliderExtensions.SetHighValue<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, TValue), TextInputBaseFieldExtensions.SetKeyboardType<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, TouchScreenKeyboardType), BaseFieldExtensions.SetLabel<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, string), SliderExtensions.SetLowValue<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, TValue), TextInputBaseFieldExtensions.SetMaskChar<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, char), TextInputBaseFieldExtensions.SetMaxLength<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, int), TextInputBaseFieldExtensions.SetPassword<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldExtensions.SetPlaceholder<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, string), TextInputBaseFieldExtensions.SetReadOnly<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldTextSelectionExtensions.SetSelectAllOnFocus<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldTextSelectionExtensions.SetSelectAllOnMouseUp<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldTextSelectionExtensions.SetSelectIndex<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, int), TextInputBaseFieldTextSelectionExtensions.SetSelectable<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), TextInputBaseFieldTextSelectionExtensions.SetTripleClickSelectsLine<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, bool), INotifyValueChangedExtensions.SetValue<TypeSelectorDisplayAttribute, TValue>(TypeSelectorDisplayAttribute, TValue, bool)
Examples
[TypeSelectorDisplay(
Name = "Damage ×",
Group = "Combat/Modifiers",
Tooltip = "Scales incoming damage",
Icon = "d_ScriptableObject Icon")]
public sealed class DamageModifier { }
[TypeSelectorDisplay(Hidden = true)]
public sealed class DelegateModifier : IModifier { }
Remarks
[Conditional("UNITY_EDITOR")] keeps this metadata out of player builds. The compiler evaluates the
symbol at the use site, so a type compiled outside Unity — a plugin .dll built by
dotnet build — carries no usage at all and none of these settings apply to it,
TypeSelectorDisplayAttribute.Hidden included. Declare the attribute from inside the Unity project.
Properties
Group
Gets or sets an explicit picker path, with / separating levels ("Combat/Melee").
null or whitespace keeps the type under its namespace.
public string? Group { get; set; }
Property Value
Remarks
The path replaces the type's namespace placement, so the type appears only under it. Empty segments are ignored.
Hidden
Gets or sets a value indicating whether the picker never offers this type — for types that are assignable but not meant to be authored in the Inspector.
public bool Hidden { get; set; }
Property Value
Remarks
Assigning from code is unaffected, and a value already stored in a field keeps rendering. Not inherited, so hiding a base type never hides the subclasses meant to be picked instead.
Icon
Gets or sets the icon shown left of the label: an EditorGUIUtility.IconContent name
("d_ScriptableObject Icon"), a project-relative asset path with extension
("Assets/Art/Icons/Damage.png"), or a Resources path without extension
("Icons/Damage"). Resolved lazily; null means no icon.
public string? Icon { get; set; }
Property Value
Name
Gets or sets the name shown instead of the type's short name. null or whitespace means no override.
public string? Name { get; set; }
Property Value
Remarks
Search still matches the real name, the tooltip still shows the full identity, and a generic type keeps
its formatted arguments appended (Mod<Single>).
Tooltip
Gets or sets the tooltip shown on the type's row; null means no override.
public string? Tooltip { get; set; }