I want to load my assets dynamically and set the materials after loading. For this I wanted to use the ready
function to run a code after the asset is loaded. My programm goes into this ready callback
for preloaded assets, but never for assets that must be loaded. Is there some kind of timeout? My assets are about 2MB. I can’t find any othe failure.
// load asset by name
var toolAsset = this.app.assets.find("myAsset.json", "model");
// wait till asset is loaded
toolAsset.ready(function(asset) {
console.log("callback");
_myInstance.model.asset = toolAsset;
// Do more...
}.bind(this));