logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    SystemAdoptionPlanner
    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.Adoption
    Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
    Syntax
    public static class SystemAdoptionPlanner

    Methods

    Plan(IReadOnlyList<string>, string)

    Multi-root counterpart of Plan(string, string): one closure walk shared by every path in rootAssetPaths — used by "Adopt assets" to bring in every OTHER shipped asset that belongs to a system in a single plan, instead of one plan per asset.

    Declaration
    public static SystemAdoptionPlan Plan(IReadOnlyList<string> rootAssetPaths, string outputRoot)
    Parameters
    Type Name Description
    IReadOnlyList<string> rootAssetPaths
    string outputRoot
    Returns
    Type Description
    SystemAdoptionPlan

    Plan(IReadOnlyList<string>, string, Func<string, bool>)

    Overload taking one more exclusion rule beyond Serenity.CreateGame.Infrastructure.Editor.Adoption.SystemAdoptionPlanner.IsShippedInstallerPrefab(System.String) — ProjectPipelineAdoption's own boot-pipeline adoption is the one caller that needs it: a root's own dependency closure can reach a shipped task the caller's selection deliberately left out (a Play*SplashScreen task when Cutscene Player is deselected, for instance), and without this it gets cloned as an orphan alongside the profile that references it. Every other caller keeps using the two-argument overload above, unaffected.

    Declaration
    public static SystemAdoptionPlan Plan(IReadOnlyList<string> rootAssetPaths, string outputRoot, Func<string, bool> additionalExclusion)
    Parameters
    Type Name Description
    IReadOnlyList<string> rootAssetPaths
    string outputRoot
    Func<string, bool> additionalExclusion
    Returns
    Type Description
    SystemAdoptionPlan

    Plan(string, string)

    Builds the adoption plan for settingsAssetPath into outputRoot.

    Declaration
    public static SystemAdoptionPlan Plan(string settingsAssetPath, string outputRoot)
    Parameters
    Type Name Description
    string settingsAssetPath
    string outputRoot
    Returns
    Type Description
    SystemAdoptionPlan
    In this article
    © 2026 Serenity. All Rights Reserved