Class AssetPathReferenceAttribute
Marks a string field, property or parameter as holding the runtime path/key/address of a Unity asset
of a given type, so Inspector tooling can offer an asset object field (drag-and-drop) instead of free
text and store the resolved path.
The asset type is named as a string (e.g. "UnityEngine.AudioClip") so this attribute carries
no Unity dependency and can be applied in the Domain layer without violating its boundaries. It is
pure metadata with no runtime effect — the annotated value remains an ordinary string.
Implements
Inherited Members
Namespace: Serenity.Global.Domain.Attributes
Assembly: Serenity.Global.Domain.dll
Syntax
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public sealed class AssetPathReferenceAttribute : Attribute, _Attribute
Constructors
AssetPathReferenceAttribute(string)
Creates the attribute targeting the named Unity asset type.
Declaration
public AssetPathReferenceAttribute(string assetTypeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | assetTypeName | Full name of the asset type, e.g. "UnityEngine.AudioClip". |
Properties
AssetTypeName
Full name of the Unity asset type the value points at (e.g. "UnityEngine.AudioClip").
Editor tooling resolves this to a Type and constrains the asset object field to it.
Declaration
public string AssetTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |