logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Attribute
    AssetPathReferenceAttribute
    Implements
    _Attribute
    Inherited Members
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.Equals(object)
    Attribute.GetHashCode()
    Attribute.Match(object)
    Attribute.IsDefaultAttribute()
    Attribute.TypeId
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    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

    Implements

    _Attribute
    In this article
    © 2026 Serenity. All Rights Reserved