Class TombstonePlanner
Plans the tombstones that make the first upgrade over an old install fully self-contained. For every
path the previous release shipped under the owned framework roots that the current version no longer
ships, the package carries an inert file at that exact path with that exact previous-release GUID: on
import Unity overwrites the customer's orphan in place (same path + GUID = a normal asset update), so
no stale code survives to break compilation, the just-imported cleaner loads in the SAME session, and
it silently sweeps the tombstones — they are deliberately absent from the shipped snapshot.
One exception: a removed .asmref/.asmdef is NOT tombstoned when the current release ships
another assembly-definition file in the same folder (a folder that graduated from an .asmref fold
to a standalone .asmdef). A tombstone there would collide with the shipped assembly def
("multiple assembly definition files"); the scrubber and cleaner remove the consumer's orphan instead.
Pure: no Unity API calls, so it is unit-testable without a running editor.
Inheritance
TombstonePlanner
Assembly: Serenity.PackageBootstrapper.Editor.dll
Syntax
public static class TombstonePlanner
Fields
OwnedRootPrefixes
Must stay equal to SerenityFrameworkOwnership.OwnedRoots (cleaner assembly — not referencable
from here); a test asserts the two lists match so the scrubber's scorch and the tombstones can never
cover different trees.
Declaration
public static readonly string[] OwnedRootPrefixes
Field Value
Methods
BuildDummyAssemblyName(string)
Deterministic unique dummy assembly name derived from the tombstone's GUID.
Declaration
public static string BuildDummyAssemblyName(string guid)
Parameters
| Type |
Name |
Description |
| string |
guid |
|
Returns
BuildTombstoneContent(string, string, string)
Inert content by extension: a .cs tombstone is a single comment (compiles empty); an
.asmdef tombstone is a valid Editor-only assembly definition with a deterministic dummy name
and no references; an .asmref tombstone points at the cleaner's assembly definition by GUID
so it always resolves; every other extension becomes an empty file.
Declaration
public static string BuildTombstoneContent(string path, string guid, string cleanerAssemblyDefinitionGuid)
Parameters
Returns
SelectTombstones(IReadOnlyList<ShippedAssetEntry>, IEnumerable<string>)
Declaration
public static List<ShippedAssetEntry> SelectTombstones(IReadOnlyList<ShippedAssetEntry> previousSnapshotEntries, IEnumerable<string> currentShippedPaths)
Parameters
Returns