I’m loading a model asset linked with materials with this:
var asset = this.app.assets.get(id_of_my_asset);
app.assets.load(asset);
asset.ready(function (asset) {
//Model ready but not materials (textures still loading)
//If I show my model here, I will see standard material (grey)
//for few seconds until my materials are completely loaded.
});
I want to fire an event when my model is completely ready with his materials and textures.
I can probably achieved that by unlinking my materials from my model in the editor, load them manually and assign them to my model all by code, but I want to avoid this solution because this will force me to establish the links outside of the editor (like in my own database).
In your example, materials and textures are tagged, but loading a material will automatically load the textures, so asking to load the same textures will not result in a double loading for textures?