logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SettingsReferenceInspector

    Walks a settings asset's serialized object-reference properties looking for one whose declared field type accepts another catalog system's settings type (SettingsReferenceRules) but holds no value — either never configured, or dangling (objectReferenceInstanceIDValue != 0 with a null resolved value, IsDangling) — and assigns a replacement once a sole project-owned candidate exists.

    Inheritance
    object
    SettingsReferenceInspector
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.CreateGame.Infrastructure.Editor.Systems
    Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
    Syntax
    public static class SettingsReferenceInspector

    Methods

    AssignReference(string, string, string)

    Assigns the asset at referencedAssetPath into propertyPath on the asset at ownerAssetPath, then saves.

    Declaration
    public static void AssignReference(string ownerAssetPath, string propertyPath, string referencedAssetPath)
    Parameters
    Type Name Description
    string ownerAssetPath
    string propertyPath
    string referencedAssetPath

    FindFirstUnassignedReference(Object, SerenityInstallableSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type>)

    The first reference field on settingsAsset that is declared to hold another catalog system's settings type but holds no value (unassigned or dangling), or null when every such field is assigned (or none exists).

    Declaration
    public static SettingsRowUnassignedReference FindFirstUnassignedReference(Object settingsAsset, SerenityInstallableSystem ownerSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type> settingsTypesByCatalogSystem)
    Parameters
    Type Name Description
    Object settingsAsset
    SerenityInstallableSystem ownerSystem
    IReadOnlyDictionary<SerenityInstallableSystem, Type> settingsTypesByCatalogSystem
    Returns
    Type Description
    SettingsRowUnassignedReference

    FindSoleProjectOwnedAssetPath(Type)

    The asset path of the sole project-owned asset of referencedType, or null when there is none or more than one — the only case an Assign action can proceed unambiguously.

    Declaration
    public static string FindSoleProjectOwnedAssetPath(Type referencedType)
    Parameters
    Type Name Description
    Type referencedType
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved