logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SystemAdoptionPlan

    The immutable outcome of Plan(string, string): the dependency closure shared by every root in RootAssetPaths (a single shipped settings asset, or — for "Adopt assets" — every other shipped asset that belongs to the same system), split into what still needs cloning and what an earlier adoption run already cloned (reused via SeedGuidMap instead of re-cloned), plus whatever the closure walk deliberately excluded and every collection-member Id rename the run will apply (PlannedIdRenames).

    Inheritance
    object
    SystemAdoptionPlan
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.CreateGame.Infrastructure.Editor.Adoption
    Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
    Syntax
    public sealed class SystemAdoptionPlan

    Constructors

    SystemAdoptionPlan(IReadOnlyList<string>, IReadOnlyList<SystemAdoptionEntry>, IReadOnlyList<SystemAdoptionExclusion>, IReadOnlyList<AdoptedIdRename>, string)

    Declaration
    public SystemAdoptionPlan(IReadOnlyList<string> rootAssetPaths, IReadOnlyList<SystemAdoptionEntry> entries, IReadOnlyList<SystemAdoptionExclusion> excludedAssets, IReadOnlyList<AdoptedIdRename> plannedIdRenames, string outputRoot)
    Parameters
    Type Name Description
    IReadOnlyList<string> rootAssetPaths
    IReadOnlyList<SystemAdoptionEntry> entries
    IReadOnlyList<SystemAdoptionExclusion> excludedAssets
    IReadOnlyList<AdoptedIdRename> plannedIdRenames
    string outputRoot

    SystemAdoptionPlan(string, IReadOnlyList<SystemAdoptionEntry>, IReadOnlyList<SystemAdoptionExclusion>, IReadOnlyList<AdoptedIdRename>, string)

    Single-root convenience constructor: settingsAssetPath becomes the plan's sole entry in RootAssetPaths.

    Declaration
    public SystemAdoptionPlan(string settingsAssetPath, IReadOnlyList<SystemAdoptionEntry> entries, IReadOnlyList<SystemAdoptionExclusion> excludedAssets, IReadOnlyList<AdoptedIdRename> plannedIdRenames, string outputRoot)
    Parameters
    Type Name Description
    string settingsAssetPath
    IReadOnlyList<SystemAdoptionEntry> entries
    IReadOnlyList<SystemAdoptionExclusion> excludedAssets
    IReadOnlyList<AdoptedIdRename> plannedIdRenames
    string outputRoot

    Properties

    Entries

    Every closure member considered for adoption (excludes the deliberately-skipped ones in ExcludedAssets).

    Declaration
    public IReadOnlyList<SystemAdoptionEntry> Entries { get; }
    Property Value
    Type Description
    IReadOnlyList<SystemAdoptionEntry>

    ExcludedAssets

    Closure members left out of adoption entirely, with the reason each was excluded.

    Declaration
    public IReadOnlyList<SystemAdoptionExclusion> ExcludedAssets { get; }
    Property Value
    Type Description
    IReadOnlyList<SystemAdoptionExclusion>

    OutputRoot

    Where this plan's clones land — the same outputRoot the caller passed to Plan(string, string). Scopes the reference-remapping back-fill pass (AdoptedReferenceBackfillScope) to assets this or an earlier adoption run produced, never a user asset elsewhere in the project nor package content.

    Declaration
    public string OutputRoot { get; }
    Property Value
    Type Description
    string

    PlannedIdRenames

    Every Id rename this plan's adoption run applies once cloning finishes — every cloned IFoundationSettings asset gets one (see RenamedId(string)). Empty only for a plan built entirely from already-adopted entries.

    Declaration
    public IReadOnlyList<AdoptedIdRename> PlannedIdRenames { get; }
    Property Value
    Type Description
    IReadOnlyList<AdoptedIdRename>

    RootAssetPaths

    Every root this plan's closure walk started from, in the order the caller supplied them. A single-root plan (SettingsAssetPath's own adoption) holds exactly one element.

    Declaration
    public IReadOnlyList<string> RootAssetPaths { get; }
    Property Value
    Type Description
    IReadOnlyList<string>

    SeedGuidMap

    Source GUID → existing destination GUID for every already-adopted entry — hand this to Serenity.Global.Infrastructure.Editor.Utils.UnityAssetSetCloneRequest so a reference inside ToClone to an already-adopted sibling resolves to that existing clone.

    Declaration
    public IReadOnlyDictionary<string, string> SeedGuidMap { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, string>

    SettingsAssetDestinationPath

    Where the adopted settings asset itself lands — the entry whose SourcePath equals SettingsAssetPath, resolved once here so callers do not re-search Entries.

    Declaration
    public string SettingsAssetDestinationPath { get; }
    Property Value
    Type Description
    string

    SettingsAssetPath

    The plan's primary root — RootAssetPaths's first element. The shipped settings asset this plan was built for.

    Declaration
    public string SettingsAssetPath { get; }
    Property Value
    Type Description
    string

    ToClone

    The subset of Entries that still needs cloning — excludes entries an earlier adoption run already produced.

    Declaration
    public IReadOnlyList<SystemAdoptionEntry> ToClone { get; }
    Property Value
    Type Description
    IReadOnlyList<SystemAdoptionEntry>
    In this article
    © 2026 Serenity. All Rights Reserved