Clone objects with JavaScript

Me and my friend are working on a game and we can’t find out how we can clone objects in JavaScript. Any help?

hi
var obj = runtimeScene.createObject(“object_name”);

then go to set obj propartes
obj.setZOrder(10);
obj.setWidth(100);
obj.setPosition(200, 300);
etc

1 Like