Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

instantiate template playcanvas

GameManager.prototype.initialize = function() {
    //instantiate template
    var templateAsset = this.app.assets.get(templateAssetId);
    var instance = templateAsset.resource.instantiate();
    this.app.root.addChild(instance);
};
 
PREVIOUS NEXT
Tagged: #instantiate #template #playcanvas
ADD COMMENT
Topic
Name
3+1 =