Skip to content

feat(convert)!: write path ids as decimal strings in object JSON - #72

Merged
nichinichisou0609 merged 1 commit into
redesign/depotfrom
redesign/pathid-strings
Oct 15, 2026
Merged

nichinichisou0609 merged 1 commit into
redesign/depotfrom
redesign/pathid-strings

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Collaborator

A path id is a 64-bit integer. As a JSON number it is rounded by readers that parse numbers as doubles (JavaScript's JSON.parse), so a player could not look up the object a reference names by its id. Object JSON now writes path ids as decimal strings:

  • {"$ref": {"file", "pathId"}} (also the unresolved {"fileId", "pathId"} form);
  • the pathId and transformPathId of prefab nodes, and the pathId of their components.

The object id <file>:<pathId> is the reference's file and pathId as written. Converters whose documents carry references get a new version (sprite.png/3, prefab.json/3, material.json/2, clip.json/3, controller.json/3, mono.json/3, font/3, shader.json/2, generic.json/3); docs/stages.md and the golden records follow.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

A path id is a 64-bit integer. Written as a JSON number, a reader that parses
numbers as doubles (JavaScript's JSON.parse) rounds most of them, so the
object a reference names could not be looked up by its id there. Object JSON
now writes every path id as its decimal string: the pathId of a {"$ref"}, and
the pathId and transformPathId of a prefab's nodes and components. The object
id "<file>:<pathId>" is the reference's file and pathId as written.

The converters whose documents hold references move to a new version
(sprite.png/3, prefab.json/3, material.json/2, clip.json/3,
controller.json/3, mono.json/3, font/3, shader.json/2, generic.json/3), so
their results are made again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit 15969ad into redesign/depot Oct 15, 2026
8 checks passed
@nichinichisou0609
nichinichisou0609 deleted the redesign/pathid-strings branch October 15, 2026 03:59
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