Namespace Serenity.CreateGame.Infrastructure.Editor.Adoption
Classes
AdoptedIdRename
One collection-member settings asset a SystemAdoptionPlan renames the Id of, keyed by the DESTINATION path the rename applies to once the asset is cloned.
AdoptedReferenceRewrite
One reference Serenity.CreateGame.Infrastructure.Editor.Adoption.AdoptedReferenceRemapper.Remap(System.Collections.Generic.IReadOnlyList{System.String},Serenity.Global.Infrastructure.Editor.Validation.FoundationReferenceIndex,Serenity.Global.Infrastructure.Editor.Validation.AdoptedAssetKeyIndex,System.Action{System.String}) re-pointed at an adopted counterpart: which asset and serialized property it found the value on, and what it replaced.
SystemAdoptionClosureRules
The pure decisions behind SystemAdoptionPlanner: which dependency-closure paths are
content (never scripts/assemblies), where a source path mirrors to under an adoption's output root,
and how the already-adopted entries seed a later clone's GUID map. No AssetDatabase calls —
existing-destination lookup is a caller-supplied delegate — so this is testable without a project.
SystemAdoptionClosureWalkResult
The outcome of WalkClosure(string, Func<string, IReadOnlyList<string>>, Func<string, bool>, Func<string, bool>): every closure member the walk visited, and every candidate it deliberately stopped descending into.
SystemAdoptionEntry
One asset in a SystemAdoptionPlan's dependency closure: where it lives in the package, where its clone belongs in the user's project, and whether that clone already exists from an earlier adoption run.
SystemAdoptionExclusion
One package asset a SystemAdoptionPlan deliberately left out of its closure, and why — the shipped composition-root installer prefab, installed once per project and never re-authored per system. The adopted clone keeps referencing the package original for this asset.
SystemAdoptionFolderSummary
Pure summary behind the "Adopt assets" confirmation dialog
(BuildAdoptAllSystemAssetsMessage(SystemAdoptionPlan)): how many plan entries
land under each top-level shipped folder (Media/Ui, Media/GameSettings, Settings...),
so the dialog can show a readable breakdown instead of a bare asset count. No AssetDatabase calls —
grouping runs entirely off each entry's SourcePath.
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).
SystemAdoptionPlanner
Plans a shipped Serenity system's adoption into the user's own project: a breadth-first walk of the
settings asset's dependency closure (WalkClosure(string, Func<string, IReadOnlyList<string>>, Func<string, bool>, Func<string, bool>), one
UnityEditor.AssetDatabase.GetDependencies(System.String) non-recursive call per visited node), filtered to package
content that is not a script or assembly definition, with the shipped composition-root installer
prefab held out as an exclusion instead — the walk never descends into an excluded node, so its own
dependencies never enter the closure. Every OTHER identity-carrying prefab (a UI component prefab
implementing IFoundationSettings through FoundationUiComponent, for instance) is cloned
normally; SystemAdoptionRunner renames each of its identity-carrying components'
IFoundationSettings.Id and regenerates their Guid together, once cloning finishes — every
adopted asset is a new asset, prefab component or ScriptableObject alike. The settings asset
itself is not part of the walk's closure (it is the starting point, never one of its own dependencies),
so Plan(string, string) adds it as its own entry — SettingsAssetDestinationPath
depends on finding it in Entries. No cloning happens here —
SystemAdoptionRunner executes the plan this produces.
SystemAdoptionResult
The outcome of a successful TryAdopt(SystemAdoptionPlan, Action<string>, out SystemAdoptionResult) run.
SystemAdoptionRunner
Executes a SystemAdoptionPlan: clones every entry still in ToClone
via Serenity.Global.Infrastructure.Editor.Utils.UnityAssetSetCloner (seeded with references to already-adopted siblings), regenerates
IFoundationSettings.Guid on every clone, labels the clones into Addressables, and commits — all
inside one Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction so a failure anywhere rolls the whole run back
instead of leaving a half-adopted system behind.
SystemAdoptionVerifier
Checks whether an adopted settings asset uses NO asset of the Serenity package — the adoption contract's own definition of "fully adopted". Walks the adopted asset's dependency closure again and reports every dependency that still resolves into a package root; scripts and assembly definitions are never violations, since adoption clones content only and the adopted asset's runtime TYPE staying in the package is expected. Zero violations means the system uses no package asset.
SystemAdoptionViolation
One dependency an adopted settings asset still resolves into the Serenity package — reported by Verify(string) when a system is not (or no longer) fully adopted, e.g. because SystemAdoptionPlanner deliberately excluded it.