Class TemplateReferenceAttribute
Marks an int or List<int> field as a template ID reference. In the Inspector, the field displays an object picker for the specified CachedScriptableObject type but serializes only the deterministic ID.
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public sealed class TemplateReferenceAttribute : PropertyAttribute
- Inheritance
-
PropertyAttributeTemplateReferenceAttribute
- Inherited Members
-
PropertyAttribute.orderPropertyAttribute.applyToCollection
Constructors
TemplateReferenceAttribute(Type)
Creates a new TemplateReferenceAttribute targeting the given template type.
public TemplateReferenceAttribute(Type templateType)
Parameters
templateTypeTypeThe ScriptableObject type to show in the picker.
Properties
TemplateType
The CachedScriptableObject-derived type to pick from.
public Type TemplateType { get; }