Class LocalizationEphemeralGroupGuard
Kills the per-locale Addressables groups and labels Unity Localization creates for a fixture's
pseudo-locale codes as soon as they materialize. Unity Localization registers a collection's tables into
Addressables from its asset postprocessor (ImportCollectionIntoProject), so the creation rides the
asset import pipeline and lands whenever an import batch flushes — after the creating fixture's
[TearDown] and even after the namespace-level LocalizationTestGroupLeakSentinel has
already run. Synchronous teardown cleanup therefore sweeps before the groups exist and never sees them.
Inherited Members
Namespace: Serenity.Localization.Tests.Editor
Assembly: Serenity.Localization.Tests.Editor.dll
Syntax
public static class LocalizationEphemeralGroupGuard
Remarks
The guard scans on every EditorApplication.update tick instead of reacting to
AddressableAssetSettings.OnModificationGlobal or scheduling one-shot delayCalls: the Unity
Test Framework holds back delayCall callbacks queued during an EditMode run, and modification events
raised inside asset-import flushes proved unreliable to observe, so any trigger-plus-latch design can
lose its one chance to sweep. A per-tick scan has no state to lose — whenever the editor ticks and an
ephemeral group or label exists, it is removed. The scan is a name check over the group and label lists,
which is cheap, and this class lives in the editor test assembly so it never ships.