instantiateModelsToScene() doesn't instantiate whatever argument is passed

I remember in the old version it was possible to create instances, but now it is not possible.

Look at this pg.
https://playground.babylonjs.com/#GPLENK

Skinned meshes are always cloned and not instantiated, even if you set doNotInstantiate = false. See Always clone skinned meshes for AssetContainer.instantiateModelsToScene by bghgary · Pull Request #12764 · BabylonJS/Babylon.js · GitHub for why it is so.

I know that skinned mesh can only be cloned, but my example is unskinned.I checked the source code, and found one line of code has a low-level logic error.


localOptions?.doNotInstantiate now is a function,but still used as boolean value. This results in never being instantiated! Hope to fix this problem soon.

Hello! Thanks for pointing this out, I tried to clean the logic up here: Clean up and improve logic for instantiating nodes in AssetContainer.… by carolhmj · Pull Request #13584 · BabylonJS/Babylon.js (github.com)

1 Like