Have the following code:
let myobj = Z.Object();
myobj.type(“Plane”);
myobj.skin(symbol.mediaFiles.icon_png);
symbol.nodes.Group.push(myobj);
If you put it inside parent.on("show", () => {});
(the script right below root) it works fine. However, if you right-click the group and create a new ready script: parent.on("ready", () => {});
and put the same code there, ZapWorks Studio will get stuck on unlocking
forever. If you add a console.log("why?")
you will notice the code gets executed in an infinite loop, removing the line myobj.skin
line fixes the bug but then the plane won’t show because the skin got removed. This is quite…strange.