I’ve stumbled upon a serious issue where multiple meshes are getting assigned same uniqueId.
Context-
My scene has various meshes and one of them has uniqueId 123. scene.getMeshByUniqueId(123) returns the appropriate mesh.
Later I’m creating several new meshes with new BABYLON.Mesh() and one of these new ones also has uniqueId as 123.
Hello @Cedric, it’s part of a big application, so it’s not easy for me to reproduce this on playground.
I can give you some additional information though. It involves mesh serialization and recreation. During serialization uniqueId is stored and reassigned upon recreation. Do you think that’s a possible reason?
I don’t know the actual reason for the problem or the solution, but for now, I’ve overidden the function BABYLON.Scene.getUniqueId to check for duplicates and my problems have gone away… for now.