Repository navigation
Spine: tests for split bundles and other atlas types #254
Description
Package: packages/spine (npm unity-asset-reader-spine), fixtures in fixtures/BUILDING.md section 18
Description
Raised in the review of PR #250 (#250 (comment)). spineSkeletons(env) documents three throws that no test covers, because the #238 fixtures have no case for them:
ResourceNotFoundErrorwhen an atlas, material or page is in a bundle that isn't loaded.UnsupportedError(kind"Spine atlas asset") for anatlasAssetsentry withoutatlasFileandmaterials(another atlas type, such asSpineSpriteAtlasAsset).UnsupportedError(kind"MonoBehaviour without type tree") for an atlas asset without a type tree, reached from a skeleton that has one.
Tasks
- Extend section 18 (2019.4.41f2, the same stub scripts): a split build, where a skeleton's atlas asset, materials and pages are in a second bundle, and a skeleton whose
atlasAssetsholds a stub atlas type with neither field (our own class name). - Commit the new bundles and regenerate the UnityPy goldens and the Oracle: AssetStudio harness for export goldens (PNG, OBJ, WAV) #233 export goldens.
- Tests in
packages/spine/tests/spine.test.ts, with the expected grouping in the section 18 table.
Acceptance
- The split skeleton bundle loaded alone throws
ResourceNotFoundErrornaming the dependency bundle's SerializedFile; loaded with it, it is grouped as section 18 writes it, and its TextAssets and pages match the export goldens. - The skeleton with the other atlas type throws
UnsupportedErrorof kind"Spine atlas asset"naming that atlas.
Depends on
- Spine export: group skeleton data, atlases and page textures #238 (PR Spine export: group skeleton data, atlases and page textures (#238) #250).
Plan: docs/unity-asset-reader-plan.md. Behavior source of truth: Razviar/assetstudio (MIT). Golden oracle: Razviar/assetstudio at c37af7d, executed in the external .NET 8 harness (#233; UnityPy only extracts inputs). MIT-derivative port: keep upstream copyright notices. Do not copy or import @arkntools/unity-js (AGPL-3.0), tests included. No C# compiled to WASM - C# is reference only, hand-ported to TS; WASM is built from C/C++ only (plan D2). Layout: npm-workspaces monorepo under packages/; dependencies point feature package -> core only (plan D7/D8, rules R13/R14).
Activity