I am instanciating templates at runtime and in general the following code works without issue and I get the message LOADED. However with some models I get the NOT LOADED error despite the template existing correctly in the templates folder(this.modelAssetTemplateName).
I cant see much difference between the models, they all have the same type of textures (jpgs), similar texture sizes and all load correctly when I simply drag the templates into the editor.
Is it just not finding the template quick enough? Do I somehow need to wait until the template is guaranteed to be found? How would I do that? Cheers
The assets in general don’t have the behaviour of loading other assets that they are using.
In this case of templates, when loading a template asset, it doesn’t load the model/texture/sound assets that the template is using.
However, when assets are used in the scene and they aren’t loaded yet, the engine will kick off a load of the asset. In this case, creating an instance of the template and adding to scene will trigger a load of any assets that haven’t been loaded yet.