Tanoda
Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute Class Reference

Place this attribute on a serialized string field to have it render as a dropdown menu that is automatically populated with implementing types of the type provided to the attribute. The string field will contain the type name selected by the user. This can be converted into a Type reference via reflection and used to construct objects by their type, for example, or to construct ScriptableObjects by their type. More...

Inheritance diagram for Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute:
Leap.Unity.Attributes.CombinablePropertyAttribute Leap.Unity.Attributes.IFullPropertyDrawer

Public Member Functions

 ImplementsTypeNameDropdownAttribute (Type type)
 

Protected Attributes

Type _baseType
 
List< Type > _implementingTypes = new List<Type>()
 
GUIContent[] _typeOptions
 

Additional Inherited Members

- Properties inherited from Leap.Unity.Attributes.CombinablePropertyAttribute
FieldInfo? fieldInfo [get, protected set]
 
UnityObject[]? targets [get, protected set]
 

Detailed Description

Place this attribute on a serialized string field to have it render as a dropdown menu that is automatically populated with implementing types of the type provided to the attribute. The string field will contain the type name selected by the user. This can be converted into a Type reference via reflection and used to construct objects by their type, for example, or to construct ScriptableObjects by their type.

Definition at line 26 of file ImplementsTypeNameDropdown.cs.

Constructor & Destructor Documentation

◆ ImplementsTypeNameDropdownAttribute()

Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute.ImplementsTypeNameDropdownAttribute ( Type  type)

Definition at line 33 of file ImplementsTypeNameDropdown.cs.

Member Data Documentation

◆ _baseType

Type Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute._baseType
protected

Definition at line 29 of file ImplementsTypeNameDropdown.cs.

◆ _implementingTypes

List<Type> Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute._implementingTypes = new List<Type>()
protected

Definition at line 30 of file ImplementsTypeNameDropdown.cs.

◆ _typeOptions

GUIContent [] Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute._typeOptions
protected

Definition at line 31 of file ImplementsTypeNameDropdown.cs.


The documentation for this class was generated from the following file: