pichou Posted September 21, 2017 Share Posted September 21, 2017 Is there a way to clone an imported mesh to use it in a different scene? I try to change the _scene parameter of the mesh like that : this.mesh._scene = newscene; but I got an error. It seems like I must import all my meshes twice in both of my scenes. Unfortunetly it will increase the loading time. Looking for suggestions! Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 21, 2017 Share Posted September 21, 2017 Hello Pichou! you can serialize your mesh and reimport it. Something like that: var serializedMesh = { }; mesh.serialize(serializedMesh); var newMesh = BABYLON.Mesh.Parse(serializedMesh, newScene); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.