logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

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

    Inheritance
    object
    SystemAdoptionRunner
    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 SystemAdoptionRunner

    Methods

    TryAdopt(SystemAdoptionPlan, Action<string>, out SystemAdoptionResult)

    Adopts plan. Returns false — with result left null and the reason sent to log — when any step through the commit throws; nothing this run created survives such a failure. The back-fill pass over assets an EARLIER run produced (invariant 3) runs AFTER the commit, deliberately outside the transaction: it rewrites pre-existing assets the transaction never tracked and therefore could not roll back by deleting them, so it is best-effort — a failure there is logged and skipped rather than failing an adoption that already succeeded.

    Declaration
    public static bool TryAdopt(SystemAdoptionPlan plan, Action<string> log, out SystemAdoptionResult result)
    Parameters
    Type Name Description
    SystemAdoptionPlan plan
    Action<string> log
    SystemAdoptionResult result
    Returns
    Type Description
    bool
    In this article
    © 2026 Serenity. All Rights Reserved