Table of Contents

Class TypeSelectableMenuAttribute

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

Declares the menu path used by the type selection dropdown when picking a concrete implementation for a [SerializeReference] field marked with TypeSelectableAttribute.

Path segments are separated by / and produce nested sub-menus (Unity's GenericMenu behavior). The concrete type's display name is automatically appended as the final segment. When the assembly declaring the type is annotated with TypeSelectableMenuPrefixAttribute, that prefix is prepended.

Types without this attribute remain at the menu root (flat behavior).

[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class TypeSelectableMenuAttribute : Attribute
Inheritance
object
Attribute
TypeSelectableMenuAttribute

Constructors

TypeSelectableMenuAttribute(string)

public TypeSelectableMenuAttribute(string menuPath)

Parameters

menuPath string

Slash-separated path (no leading/trailing slash required).

Properties

MenuPath

Menu path for this type, e.g. "Composites" or "Leaf/Tag".

public string MenuPath { get; }

Property Value

string