Table of Contents

Class TypeSelectableAttribute

Namespace
ElectricDrill.AstraRpgFramework.Utils
Assembly
com.electricdrill.astra-rpg-framework.Runtime.dll

Custom attribute to mark fields for SerializeReference type selection. Apply this to [SerializeReference] fields to enable type selection dropdown.

public class TypeSelectableAttribute : PropertyAttribute
Inheritance
object
Attribute
TypeSelectableAttribute

Constructors

TypeSelectableAttribute()

Creates a TypeSelectable attribute without a default type.

public TypeSelectableAttribute()

TypeSelectableAttribute(Type)

Creates a TypeSelectable attribute with a specified default type.

public TypeSelectableAttribute(Type defaultType)

Parameters

defaultType Type

The type to instantiate when "Default" is selected.

Properties

DefaultType

The default type to use when "Default" is selected. If null, "None" option will be shown instead.

public Type DefaultType { get; }

Property Value

Type