Skip to content

Unity import: find exporters added to placed models (#223) - #225

Merged
rixnobis merged 2 commits into
mainfrom
unity-model-ids
Oct 20, 2026
Merged

rixnobis merged 2 commits into
mainfrom
unity-model-ids

Conversation

@rixnobis

Copy link
Copy Markdown
Contributor

Unity 2019.3+ writes internalIDToNameTable: [] in a model's .meta and gives the model's objects ids from XXH64 of Type:<type>-><path>0. An exporter added to a placed .fbx (#223's plane_2x2) hangs off one of those ids, so the importer found no object for it and skipped it. instantiateModel now hashes the root and each node for GameObject, Transform, MeshFilter, MeshRenderer and SkinnedMeshRenderer; a filled .meta table is used first (older projects), and a single top-level node merges into the root as Unity does.

All 48 ids in the new fixture tests/fixtures/unity-models (FBX files, metas and scene saved by Unity 6000.3.12f1) match. testUnityModelIds checks them and the import; with the fix reverted it fails 8 checks with #223's message.

Partly fixes #223: PSXSkinnedObjectExporter (Sibilla_model) now reports "not imported yet" in place of the mesh message, because the importer has no skinned import yet. That comes next.

Unity 2019.3+ writes internalIDToNameTable: [] in a model's .meta and
names the model's objects by XXH64 of "Type:<type>-><path>0", so an
exporter added to a placed .fbx hung off an object we could not find
and was dropped (#223). Hash the root and every node's GameObject,
Transform, MeshFilter, MeshRenderer and SkinnedMeshRenderer; the .meta's
table still wins. A lone top-level node is the prefab root, as in Unity.
Fixture tests/fixtures/unity-models saved by Unity 6000.3.
An object holding a PSXSkinnedObjectExporter was reported both as "not
imported yet" and as having a mesh Unity did not export, which Unity
does export (as a skinned mesh). Keep the first item only.
@rixnobis
rixnobis merged commit faf7cfe into main Oct 20, 2026
5 checks passed
@rixnobis
rixnobis deleted the unity-model-ids branch October 20, 2026 19:03
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.

Items with PSXObjectExporter don't get exported from Unity

1 participant