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), and the shipped assets an
Serenity.Global.Infrastructure.Editor.ISerenityDelegatedAdoption adopts through its own package's
API instead of the byte cloner (DelegatedPaths).
Inheritance
SystemAdoptionPlan
Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
Syntax
public sealed class SystemAdoptionPlan
Constructors
SystemAdoptionPlan(IReadOnlyList<string>, IReadOnlyList<SystemAdoptionEntry>, IReadOnlyList<SystemAdoptionExclusion>, IReadOnlyList<AdoptedIdRename>, string, IReadOnlyList<string>, IReadOnlyList<string>)
Declaration
public SystemAdoptionPlan(IReadOnlyList<string> rootAssetPaths, IReadOnlyList<SystemAdoptionEntry> entries, IReadOnlyList<SystemAdoptionExclusion> excludedAssets, IReadOnlyList<AdoptedIdRename> plannedIdRenames, string outputRoot, IReadOnlyList<string> delegatedPaths = null, IReadOnlyList<string> delegatedAdoptionDescriptions = null)
Parameters
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
Properties
DelegatedAdoptionDescriptions
What adopting DelegatedPaths really creates or reuses, one line per unit, in the
words of the adopter that owns them — a whole localization collection for the one table a settings asset
references. A plan built without them lists DelegatedPaths themselves.
Declaration
public IReadOnlyList<string> DelegatedAdoptionDescriptions { get; }
Property Value
DelegatedPaths
Shipped assets the closure reached that the byte cloner must not copy — a Unity Localization
table, whose copy would belong to no collection — handed to the delegated adopter that owns each of
them. Never part of Entries, and never descended into by the closure walk.
Declaration
public IReadOnlyList<string> DelegatedPaths { get; }
Property Value
Entries
Every closure member considered for adoption (excludes the deliberately-skipped ones in
ExcludedAssets).
Declaration
public IReadOnlyList<SystemAdoptionEntry> Entries { get; }
Property Value
ExcludedAssets
Closure members left out of adoption entirely, with the reason each was excluded.
Declaration
public IReadOnlyList<SystemAdoptionExclusion> ExcludedAssets { get; }
Property Value
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
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
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
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
SettingsAssetDestinationPath
Declaration
public string SettingsAssetDestinationPath { get; }
Property Value
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
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
Methods
ReusingDestinationsCreatedEarlier(ICollection<string>, Func<string, string>)
This plan with every entry still to clone whose destination is in
destinationPathsCreatedEarlier turned into a reused one — for the later plans of one
confirmed run, whose shared dependencies an earlier plan of the same run has just cloned. No entry is
added or dropped, so the run never does more than the plan shown; the rename planned for a now-reused
entry is dropped, since that clone already carries its own. Returns this plan itself when none of its
clones was created earlier.
Declaration
public SystemAdoptionPlan ReusingDestinationsCreatedEarlier(ICollection<string> destinationPathsCreatedEarlier, Func<string, string> resolveExistingDestinationGuid)
Parameters
Returns