Jump to content

How to manage babylon scene texture loading with assets manager


hcmetal
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...