Search the Community
Showing results for tags 'meadata cloning'.
-
Yo @Deltakosh ... I know you said you dont wanna add any code to the engine specifically for my toolkit. But the last changes you made to metadata cloning is KILLING ME BRO... specifically the like in constructor babylon.mesh.ts: this.metadata = source.metadata; This is line is really setting a "POINTER" so to speak on the clone to the original metadata instead of making a COPY of the metadata. I had tons of code for "Prefabs" or mesh cloning where I would do something like this: mesh.metadata.clone = () => { return BABYLON.SceneManager.CloneMetadata(mesh.metadata); }; But somehow via the cloning framework, if you set: this.metadata = source.metadata ... that screws the whole thing up for me and a (almost) year worth of METADATA code I was using before that lone of code showed up. Can we at least add some kind of switch so those us who need CUSTOM METADATA CLONING ... not just simply setting a "REFERENCE" to the the original metadata in the clone. Something like this: if (!BABYLON.Mesh.CUSTOM_METADATA_CLONING) { this.metadata = source.metadata; } Then I could set that STATIC switch to true to use custom metadata cloning like this: // Setup metadata cloning mesh.metadata.clone = () => { return BABYLON.SceneManager.CloneMetadata(mesh.metadata); }; If not, then I will have to use Custom Builds of babylon.js in the Toolkit... Which not be a bad ideal so I can keep the toolkit working to a Custom Build of the current stable release... What do you think... I just thought I would ask