Skip to content

Spine: tests for split bundles and other atlas types #254

Open

Description

@fatal10110

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:

  • ResourceNotFoundError when an atlas, material or page is in a bundle that isn't loaded.
  • UnsupportedError (kind "Spine atlas asset") for an atlasAssets entry without atlasFile and materials (another atlas type, such as SpineSpriteAtlasAsset).
  • 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 atlasAssets holds 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 ResourceNotFoundError naming 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 UnsupportedError of kind "Spine atlas asset" naming that atlas.

Depends on


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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:serializedSerializedFile and TypeTreebacklogOn-demand, no named consumer yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions