logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class FoundationIdFieldAttribute

    Marks a serialized string field as holding the Id of an IFoundationSettings definition of a given type, so the Inspector renders an object-field picker (backed by the candidate assets' ids) instead of a plain text box.
    Derives from UnityEngine.PropertyAttribute so Unity can resolve FoundationIdFieldDrawer for it; this is the Unity-serializable counterpart of the engine-agnostic FoundationIdReferenceAttribute used for reflection-based tooling.

    Inheritance
    object
    FoundationIdFieldAttribute
    Namespace: Serenity.Global.Infrastructure.Attributes
    Assembly: Serenity.UnityGlobal.Infrastructure.dll
    Syntax
    public sealed class FoundationIdFieldAttribute : PropertyAttribute

    Constructors

    FoundationIdFieldAttribute(Type)

    Creates the attribute targeting the given definition type.

    Declaration
    public FoundationIdFieldAttribute(Type definitionType)
    Parameters
    Type Name Description
    Type definitionType

    The IFoundationSettings-derived type to source ids from.

    Properties

    DefinitionType

    The definition type whose instances' ids are valid values — typically an IFoundationSettings-derived type (e.g. an audio clip definition). The drawer lists the ids of every asset assignable to this type.

    Declaration
    public Type DefinitionType { get; }
    Property Value
    Type Description
    Type
    In this article
    © 2026 Serenity. All Rights Reserved