Table of Contents

Class TemplateReferenceAttribute

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

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
PropertyAttribute
TemplateReferenceAttribute
Inherited Members
PropertyAttribute.order
PropertyAttribute.applyToCollection

Constructors

TemplateReferenceAttribute(Type)

Creates a new TemplateReferenceAttribute targeting the given template type.

public TemplateReferenceAttribute(Type templateType)

Parameters

templateType Type

The ScriptableObject type to show in the picker.

Properties

TemplateType

The CachedScriptableObject-derived type to pick from.

public Type TemplateType { get; }

Property Value

Type