logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SettingsReferenceRules

    The pure decision behind SettingsReferenceInspector: whether a settings field's declared type is a reference to another catalog system's settings type, and the message a row shows when that reference is unassigned. No UnityEditor access, so it is testable without any asset on disk.

    Inheritance
    object
    SettingsReferenceRules
    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 SettingsReferenceRules

    Methods

    BuildDanglingReferenceDetail(string)

    The row detail message for a field named fieldDisplayName whose referenced asset no longer exists.

    Declaration
    public static string BuildDanglingReferenceDetail(string fieldDisplayName)
    Parameters
    Type Name Description
    string fieldDisplayName
    Returns
    Type Description
    string

    BuildMissingReferenceDetail(string, string)

    The row detail message for a field named fieldDisplayName that must reference referencedSystemDisplayName but currently does not.

    Declaration
    public static string BuildMissingReferenceDetail(string fieldDisplayName, string referencedSystemDisplayName)
    Parameters
    Type Name Description
    string fieldDisplayName
    string referencedSystemDisplayName
    Returns
    Type Description
    string

    TryResolveReferencedSystem(Type, SerenityInstallableSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type>, out SerenityInstallableSystem)

    True when fieldType can hold an instance of some OTHER catalog system's settings type — i.e. fieldType is assignable from that system's resolved settings type — naming the first such system found in settingsTypesByCatalogSystem. ownerSystem is excluded so a system's own settings type never counts as a reference to itself.

    Declaration
    public static bool TryResolveReferencedSystem(Type fieldType, SerenityInstallableSystem ownerSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type> settingsTypesByCatalogSystem, out SerenityInstallableSystem referencedSystem)
    Parameters
    Type Name Description
    Type fieldType
    SerenityInstallableSystem ownerSystem
    IReadOnlyDictionary<SerenityInstallableSystem, Type> settingsTypesByCatalogSystem
    SerenityInstallableSystem referencedSystem
    Returns
    Type Description
    bool
    In this article
    © 2026 Serenity. All Rights Reserved