hcmetal Posted November 17, 2018 Share Posted November 17, 2018 Hello everyone, Consider using a meshTask to load a .babylon file with the assetsManager: assetsManager.addMeshTask("load meshes", "", "/assets/", "hotel.babylon"); When the meshes are loaded, the textures related with the scene are also automatically loaded. Notice no textureTasks have been manually added. However, when counting the tasks with: assetsManager.onProgress = function(remainingCount, totalCount) { // ... counting logic ... }; Only one task (the meshTask) is been counted. I am trying to figure out how to make the assetsManager manage (count) the texture loading associated with the .babylon scene. Do I have to manually add textureTasks on every texture? This seems like a bad idea, doing the same thing twice. Hope someone can point me to the right direction. Thanks alot! Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 19, 2018 Share Posted November 19, 2018 Unfortunately, it is not available by default in the asset manager. Actually, one asset is considered with its dependencies. Maybe you could rely on the scene.onNewTextureAddedObservable to detect the creation of texture and then hook in the onReady of each of the textures you detected ? hcmetal 1 Quote Link to comment Share on other sites More sharing options...
hcmetal Posted November 20, 2018 Author Share Posted November 20, 2018 @Sebavan, thanks for your help! This idea seems very promising. Will try it out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.