logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityObsoleteAssetCleaner

    Removes leftovers from previous package versions after an upgrade. Unity's .unitypackage import is additive — it never deletes files — so a customer upgrading over an older install keeps orphaned scripts that no longer compile against the current codebase. The package owns Assets/Serenity/Scripts, Tests and Documentation outright (see Serenity.Editor.ObsoleteAssetCleaner.SerenityFrameworkOwnership): any file under those roots that is not listed in the shipped ShippedAssetsSnapshot.json is an orphan and is moved to the OS trash (recoverable). The cleaner lives in an isolated assembly with no references to any other Serenity assembly so it keeps compiling — and keeps cleaning — even when a stale orphan breaks another assembly. Orphans are not treated equally: Serenity.Editor.ObsoleteAssetCleaner.ObsoleteAssetClassifier.ClassifySweep(System.Collections.Generic.IReadOnlyList{System.String},System.Collections.Generic.IReadOnlyCollection{System.String},System.Func{System.String,System.Boolean},System.Func{System.String,System.Boolean},System.Func{System.String,Serenity.Editor.ObsoleteAssetCleaner.OrphanReconciliationEvidence}) decides what is safe to trash — or move, or restore-and-trash — based on provenance rather than a raw count (see its remarks for the real-world incidents that shaped it).

    Inheritance
    object
    SerenityObsoleteAssetCleaner
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Editor.ObsoleteAssetCleaner
    Assembly: Serenity.ObsoleteAssetCleaner.Editor.dll
    Syntax
    public static class SerenityObsoleteAssetCleaner
    In this article
    © 2026 Serenity. All Rights Reserved