Skip to content

Spine export: group skeleton data, atlases and page textures #238

Closed

Description

@fatal10110

Package: new packages/spine (npm unity-asset-reader-spine)

Description

Flips the "Export Spine" row in COMPARISON.md. spine-unity stores a skeleton as a SkeletonDataAsset MonoBehaviour pointing at the skeleton data (skeletonJSON → TextAsset, .json or .skel.bytes) and at SpineAtlasAssets. Each atlas asset has an atlasFile (TextAsset) and materials, whose _MainTex textures are the atlas pages. Exporting means collecting those per skeleton.

AssetStudio has no Spine export, so there is no oracle for the grouping itself; only its parts (TextAsset bytes, page pixels) are checked against #233.

Tasks

  • Plan amendment: add an M6 row for Spine export and the package name.
  • Scaffold the package (core peer dependency only, R14).
  • spineSkeletons(env) → { name, skeleton, atlases: [{ atlas, pages }] }, pages being Texture2D assets. Found by MonoBehaviour field names through type trees; spine-unity 3.8 and 4.x field names taken from real type trees.
  • Fixture: our own Unity project with stub MonoBehaviours using the same field names (no spine-unity package), and a minimal skeleton JSON and atlas we write ourselves. Project sources in fixtures/BUILDING.md (R2, R11).
  • Document the limit: type-tree-stripped builds are not readable (DLL reflection is a non-goal).
  • Flip the COMPARISON.md row.

Acceptance

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions