prefrontalcortex / UnityGLTF

Runtime GLTF Loader for Unity3D
MIT License
163 stars 41 forks source link

Model fails to import since extras property is only partially parsed #126

Closed hybridherbst closed 11 months ago

hybridherbst commented 11 months ago

This fails completely: kid.glb.zip

hybridherbst commented 11 months ago

Looks like there's incorrect parsing of the mesh going on: instead of parsing the "extras" property as part of the array deserializerFunc, the loop repeats for all sub properties of extras, passing them to the deserializerFunc which ends up creating empty primitives with no attributes at all.

So two bugs:

hybridherbst commented 11 months ago

Turns out this was related: https://github.com/KhronosGroup/glTF/issues/1036 The primitives.extra property was parsed for targetNames, but not in a correct way, so nested objects as primitives.extra messed up the import.

hybridherbst commented 11 months ago

Fixed on dev