Skip to content

feat(export)!: run unity.export once per unit instead of once per bundle - #63

Merged
nichinichisou0609 merged 1 commit into
redesign/depotfrom
redesign/unit-export
Oct 14, 2026
Merged

nichinichisou0609 merged 1 commit into
redesign/depotfrom
redesign/unit-export

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Collaborator

Summary

unity.export (version 2) now runs one task per unit:

  • A unit is a prefab hierarchy (a root GameObject with the objects its prefab holds) or an object outside any hierarchy.
  • A unit is named by the stable address of its root object, <bundle>:<pathId>.
  • Path ids stay when a bundle's content changes, so a unit keeps its task id across catalog versions.

Unit table and selection

  • The unit table (nnnotes.pipeline.units) is built from the censuses.
  • A run exports the units of the selected bundles, plus every unit their objects reference (census refs).
  • --only-class now selects units by the class of their root object. It is no longer part of the task keys.

Batching and keys

  • The tasks of one bundle are one batch: a worker loads the bundle once and shares its object index, hierarchies, atlases and last decoded textures.
  • A unit's result depends neither on the other units of its batch nor on their order (tested).
  • A task key holds:
    • the bundle;
    • the unit's root;
    • the converters of its classes;
    • the script entries and shipped type trees its objects use.

Other changes

  • MonoScript and AssetBundle objects get the generic typetree JSON.
  • The bundle-level scripts.json and bundle.json artifacts are removed, as are the link.artifacts stage and the nnnotes.artifacts/1 schema.
  • The original layout roots objects without a container path at _bundles/<bundle>, from the unit table.
  • cri.audio, cri.movie, sprite.crop and view.voices find bundle-held content through the unit table.
  • Docs: stages.md has a new "Units" section, and assets.md, contracts.md, schemas.md and cli.md are updated.

Test plan

  • Full test suite
  • Golden records regenerated with the pinned environment and checked with GOLDENS_STRICT=1
  • ruff, pyright, import-linter, mkdocs build --strict

🤖 Generated with Claude Code

unity.export (version 2) runs one task per unit: a prefab hierarchy (a root
GameObject with the objects its prefab holds) or an object outside any
hierarchy, named by the stable address of its root object,
`<bundle>:<pathId>`. The unit table (nnnotes.pipeline.units) comes from the
censuses: a run exports the units of the selected bundles and every unit
their objects reference, and `--only-class` selects units by the class of
their root object instead of entering the task keys.

- The tasks of one bundle form one batch: a worker loads the bundle once and
  shares its object index, hierarchies, atlases and last decoded textures
  across them. A unit's result does not depend on the other units of the
  batch or their order.
- A task key covers the bundle, the unit's root, the converters of its
  classes and the script entries and shipped type trees its objects use, so
  a converter or script change runs again only the units holding it.
- MonoScript and AssetBundle objects get the typetree JSON like any other
  class.
- The original layout roots objects without a container path at
  `_bundles/<bundle>` from the unit table; cri.audio, cri.movie, sprite.crop
  and view.voices find bundle-held content through it.

BREAKING CHANGE: unity.export task ids are `unity.export:<bundle>:<pathId>`.
The bundle-level artifacts `scripts.json` and `bundle.json`, the
link.artifacts stage and the nnnotes.artifacts/1 schema are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit def3769 into redesign/depot Oct 14, 2026
8 checks passed
@nichinichisou0609
nichinichisou0609 deleted the redesign/unit-export branch October 14, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant