Hi, I have submitted the bug report via the “Report a bug” menu option but I’d like to give further context via this screenshot.
The scene in question gives an error while trying to load Material 7 of an array that only contains 3 materials. Another funny thing is that the scene in question has only 2 materials. “Lit” is included twice in the material list for some reason.
Hello @JanG this seems related to using MeshOpt compression. I’m currently looking at the code of the compression library. It doesnt happen with Draco
Hi so the root issue seems to be caused by the GLTF export where the gltf contains the same material multiple times but only the first instance is referenced/actually used leading to all other materials being deduplicated (which is correct) but ultimately causing the issue due to mismatching indices.
I created two issues for those internally
Hi @JanG can you try doing a clean install and re-compress. It should update the compression pipeline to 1.2.0 which should also fix this issue for you
That’s great but also unexpected what exactly did you do? I would guess the compression pipeline did already update when you ran it the first time now (?) and is now on 1.2.0 ? It’s in one of the last logs when you run the Apply Compression menu item
hey! pinging as I think I’ve seen this same error show up in a relatively minimal scene - and only in Production builds (not Development)! so that might explain why @JanG had this seemingly disappear earlier. Going to try updating to the latest everything version and will submit a new bug report if it still persists.
alright - I took a different approach, but I’ve now reproduced this warning in a Production build of a scene with nothing in it but a camera, a single worldspace Unity canvas, and a single RawImage - all wrapped under a SceneRoot with the MeshCompression component on it with Meshopt selected. Even better, the error disappears when MeshCompression is set to None.
This is all with Exporter 3.10.3-pre and Engine 3.10.3-beta. Will try updating now, but if updates don’t fix it, I guess our path forward will be to just use different compression for certain objects!
…unfortunately, upon rebuilding the Needle folder to submit the package, the error disappeared again, despite no scene changes I guess I’ll just have to wait til the message appears again to submit the report…
That’s strange. Let us know if it happens again.
We’re aware that there’s potential (wrong) material deduplication happening with meshopt compression (draco should be fixed upstream already) - there’s still the task on my list to check why materials are duplicated on export in the first place.