logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Global.Domain.Attributes

    Classes

    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.

    FloatRangeAttribute

    Declares the valid numeric range of a float field, property or parameter, plus optional display hints for Inspector tooling (render as a percentage slider, and/or show a reset button).
    The range is a domain-meaningful value constraint; the display flags are pure authoring conveniences. No Unity dependency, so it can be applied in the Domain layer.

    FoundationIdReferenceAttribute

    Declares that a string field, property or constructor parameter holds the Id (or, with Kind, the Guid) of an IFoundationSettings definition — the single place the project states "this string names another asset". Inspector tooling reads it to offer a dropdown of the existing definition ids instead of free text, and the reference contract table is derived from the fields that carry it, so validation, adoption and Clone Directory all re-point exactly the declared fields and nothing else.
    Put it on any serialized string (or string array/list) of your own foundation settings type, or of a serializable class nested in one; repeat it when one field is read as different references depending on a sibling field (Selector).
    Pure metadata with no Unity dependency; it has no effect at runtime — the annotated value remains an ordinary string.

    FoundationReferenceTypeNames

    The short names of the foundation settings types other modules reference by Id or Guid, for DefinitionTypeName where the declaring assembly cannot reference the type itself. Stated once so a renamed type is one edit and the names are never retyped. Each name has the words an author uses for that kind of asset beside it (DisplayNameOf(string)), so a sentence about a reference says "view" where the type is called UnityViewDefinition.

    In this article
    © 2026 Serenity. All Rights Reserved