Whenever I run this code:
var entity = new pc.Entity();
entity.name = "Shot";
entity.addComponent("script",{}
);
entity.script.create("run", {});
I get the error: “entity.script.create is not a function”
I want to dynamically create an object and attach a script to it