logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Global.Tests.Editor.WebGL

    Classes

    SerenityWebGLResourcesExporterCharacterizationTests

    Characterization tests for the pieces of Serenity.Global.Infrastructure.Editor.Utils.WebGL.SerenityWebGLResourcesExporter and Serenity.Global.Infrastructure.Editor.Utils.WebGL.WebGLDependencyCopier that do not need a live Addressables setup: report-record accumulation (AppendDependencyRecord and its Skipped/Failed callers, on the copier), summary formatting on the exporter's nested ExportReport, and the no-dependency path of ClassifyDirectDependencies (also on the copier).

    SerenityWebGLResourcesPluginsRootTests

    The WebGL Resources tools honour the Assets/Plugins/Serenity install shape as package content, not only Assets/Serenity: a scratch folder under the real Plugins root stands in for an install laid out there, and is removed — together with the Plugins root itself when the test created it — afterwards.

    SerenityWebGLResourcesRoundTripFootprintTests

    What a WebGL Export → Remove round trip may leave behind: nothing. The folder tree comes back exactly as it was — including a Resources folder the export had to create — no file the round trip only moved is renamed or rewritten on the way, a file whose field it rewrote comes back byte for byte, and nothing it moved is queued for the passive Addressables labeler, which would otherwise re-derive labels the recorded registration never had.

    SerenityWebGLResourcesRoundTripTests

    The round-trip contract of the WebGL Resources tools, run end to end on copies of real shipped assets: the REAL exporter moves them into a Resources destination and the REAL cleaner brings them back. After Export → Remove every asset is back at its path with its GUID, its bytes and its Addressables registration, and nothing the author owns is overwritten when the way back is blocked. Every Export and Remove runs through the fixture, which fails the test if the call touched any real project content — the shipped package tree, the project's Resources folder or the Addressables data (see WebGLRoundTripFixture for why that guard lives in the test and not in the exporter).

    WebGLExportClassifierPredicateTests

    Characterization tests for the Serenity.Global.Infrastructure.Editor.Utils.WebGL.WebGLExportClassifier predicates that used to resolve their own asset type through AssetDatabase, and now take the resolved type instead.

    WebGLExportClassifierTests

    Characterization tests for Serenity.Global.Infrastructure.Editor.Utils.WebGL.WebGLExportClassifier — the decisions the WebGL export makes from an asset path and its labels alone.

    WebGLLocalizationReflectionReaderTests

    Characterization tests for Serenity.Global.Infrastructure.Editor.Utils.WebGL.WebGLLocalizationReflectionReader, which reads Unity Localization's tables by property name so the exporter never has to bind that package as a type.

    WebGLRoundTripContentGuard

    The real project content a round-trip test must leave exactly as it found it — the shipped package tree, the project's own Resources folder and the Addressables data, whose group assets include the real Serenity group — taken just before one Export or Remove and compared right after it. Both the bytes of every file (.meta files included) and the set of asset GUIDs under those folders are compared, so a failure names each file that was rewritten, added or removed and each asset that left or entered them. Only the paths the fixture itself owns inside those folders — its throwaway group asset — are exempt.

    WebGLRoundTripFixture

    The world a WebGL Export → Remove round trip runs in: copies of real shipped assets under a throwaway project folder, registered in an Addressables group of their own with the labels of the shipped original, and a Resources destination beside them. Dispose() removes the group, every entry of the fixture's assets and the whole folder, whatever the test left behind.

    The exporter's contract is to export shipped package content — the menu command exports the real Serenity group, whose assets all live in the package, and moves every runtime-safe dependency they reach, package content included. So the exporter cannot be what keeps a test away from the real project; this fixture is. It runs every Export and Remove through Export() and Remove(), which point the exporter at the fixture's own group only and wrap each call in a WebGLRoundTripContentGuard: the call fails loudly, naming the file or the asset, if it moved, rewrote, added or removed anything in the shipped package tree, the project's Resources folder or the Addressables data — the real Serenity group included — instead of relying on the copies happening to reach nothing real.

    In this article
    © 2026 Serenity. All Rights Reserved