logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AdoptedIdentityRules

    The pure decision behind adoption's Id renaming: every cloned IFoundationSettings asset — a collection member, a singleton, a prefab's identity-carrying component, all alike — gets a fresh, project-local Id so it never collides with the shipped asset it was cloned from and is unambiguously a NEW asset, never a shipped one re-saved. The CreateGame editor's own adoption-time reference remapper (AdoptedReferenceRemapper) then re-points every reference the adopted set holds so this renaming never stands alone.

    Inheritance
    object
    AdoptedIdentityRules
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Global.Application.References
    Assembly: Serenity.Global.Application.dll
    Syntax
    public static class AdoptedIdentityRules

    Methods

    IsAdoptedId(string)

    True when id already carries Serenity.Global.Application.References.AdoptedIdentityRules.AdoptedIdSuffix — a clone this rule (or an earlier adoption run) already renamed.

    Declaration
    public static bool IsAdoptedId(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    bool

    RenamedId(string)

    The Id a renamed clone carries: originalId with Serenity.Global.Application.References.AdoptedIdentityRules.AdoptedIdSuffix appended, unchanged when originalId is null/empty or already carries the suffix (idempotent — re-planning an already-adopted asset must never double-suffix it).

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