Class AssetPathFieldAttribute
Marks a serialized string field as holding the project path of a Unity asset of a given type,
so the Inspector renders a constrained object-field picker (drag-and-drop) instead of a plain
text box, writing the selected asset's path back into the field.
Derives from UnityEngine.PropertyAttribute so Unity can resolve
AssetPathFieldDrawer for it; this is the Unity-serializable counterpart of the
engine-agnostic AssetPathReferenceAttribute used for reflection-based tooling.
Namespace: Serenity.Global.Infrastructure.Attributes
Assembly: Serenity.UnityGlobal.Infrastructure.dll
Syntax
public sealed class AssetPathFieldAttribute : PropertyAttribute
Constructors
AssetPathFieldAttribute(Type)
Creates the attribute targeting the given asset type.
Declaration
public AssetPathFieldAttribute(Type assetType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | assetType | The Unity asset type the annotated field should reference. |
Properties
AssetType
The Unity asset type the field should be constrained to (e.g. typeof(AudioClip)).
Declaration
public Type AssetType { get; }
Property Value
| Type | Description |
|---|---|
| Type |