Just starting with PlayCanvas.
I am using the example ‘Creating entities programmatically’ and trying to change the rendered entity from a box primitive to an asset. I changed only this part of the code (script entity_creator.js) like that, changing the type to asset and giving the asset number of the model template but it fails.
Any suggestions?
// Add a new Model Component and add it to the Entity.
entity.addComponent("render", {
type: 'asset',
asset: 111431946
});