Metadata is not unique within GLB meshes

This is more of a gotcha for anyone else who comes across it. I thought i was being so clever to store collision properties in mesh.metadata. But been battling a bug for a long while - where it turns out it’s b/c when you set mesh.metadata to a value, the same value is set across every mesh in that imported GLB. As you can see here. Just sharing (and comments welcome, of course).

Below, i set a field in the metadata to 30 - and all meshes in that GLB are then 30.

It does work for me:

Are you sure you didn’t set the same (sub-)object to all mesh metadata at the source (Blender maybe)?

it’s possible. i’m working with imported 3rd party assets (where i dont know what’s in there ahead of time) - so it’s a mixed bag in terms of how the files are structured.