Cannot set property material of [object Object] which has only a getter

I use AssetContainer.instantiateModelsToScene() clone the model.I need to clone the material.An error was throw.

It crashes because it tries to set the material on an instanced mesh, which is not possible as an instanced mesh inherits the material from its master mesh (there’s no setter for material in the InstancedMesh class).

Will be fixed by: