Model Settings in the scenario are not preloaded. How do I get the loaded callback function

Model Settings in the scenario are not preloaded. How do I get the loaded callback function
1586751182(1)

How do I set the loaded callback function

Hi @chuxinhao,

You can subscribe to the load event for that asset using this method:

myAsset.ready(function() {
   // asset is ready
}.bind(this));
1 Like
  • How do I write the whole thing.
    myAsset what is

myAsset is just a name for a variable that reference the asset you are asking on your initial post.

There are plenty ways to get that, one is using the asset registry and the asset name:

var myAsset = this.app.assets.find('TheNameOfYourAsset');

myAsset.ready(function() {
   // asset is ready
}.bind(this));
1 Like
  • Thanks a lot. Problem solved
1 Like