kri100s
1
Hi All,
Any idea why button cloning works fine in the playground and not when compiling from IDE? Creating works fine and I can see the button object.
var bt1 = BABYLON.GUI.Button.CreateSimpleButton("bt1", "bt1");
var bt2 = bt1.clone();
Error says: TypeError: bt.clone is not a function
kri100s
2
Ok, I think that does same thing:
const serializedBt = {};
someButton.serialize(serializedBt);
var myNewButton = GUI.Button.Parse(serializedBt);
This has possibly to do with the build setup, can you share it with us? But yeah, clone essentially does this same thing.
kri100s
4
Thanks, unfortunately cant share the setup. I think I will be fine with parsing.
kri100s
5
I updated from 5.24.0 to latest 5 and the clone works fine.