UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

ScriptedImporter interprets GLB file length incorrectly

Open naikrovek opened this issue 8 years ago • 4 comments

I have a GLB here which validates OK but doesn't import when I drag it into the assets folder of Unity. UnityGLTF complains with GLTFHeaderInvalidException: File length does not match chunk header.

A) Chunk headers don't define file length, the file header does that. B) This glTF file (attached) loads fine everywhere I've tried. C) This glTF file validates in Khronos' glTF-Validator with zero errors and zero warnings.

The scripted importer doesn't import valid GLB files.

ToyWagon.zip

naikrovek avatar Aug 24 '18 14:08 naikrovek

Does this happen with runtime import as well, or just when dragging the glb into Unity?

lilyvelour avatar Aug 30 '18 17:08 lilyvelour

Just when dragging. Loading GLBs served over http(s) works fine.

naikrovek avatar Aug 30 '18 19:08 naikrovek

I get the same issue with a minimal cube.glb exported by UnityGLTF itself, attached. The glb displays fine everywhere else.

Cube.glb.zip

andreasplesch avatar Apr 25 '19 15:04 andreasplesch

Fixed in latest release

robertdorn83 avatar Feb 09 '24 08:02 robertdorn83