arek3D

Loading progress for import mesh while AssetsManager is used.

Recommended Posts

Hello, 

I have a problem with get information how many percent of all mesh/textures were loaded, while I use AssetsManager.
I have seen a similar topic, but there SceneLoader is used.
Is it possible to get those information about loading progress, while I use AssetsManager?

Share this post


Link to post
Share on other sites

Hi arek3d, welcome to the forum.  Let's ping mister @Temechon and see if he'll offer advice.  :)

https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.assetsManager.ts#L314

I see no mention in here... about "progress", so, I don't think the DefaultLoadingScreen has a progress feature available.  But I'm no expert.

You COULD build your own loading screen, and tell users how many assetsManager tasks still remain unfinished (by counting-down a global number... with each task.onSuccess() callback.)

Each task's onSuccess function... updates the "count-down" on your custom loading screen.  *shrug*.  It's not byte-based progress.  It's "How many assetsManager tasks still remain".  :)

Just an idea.  Likely not a very good one.  Hopefully, others will comment.

Share this post


Link to post
Share on other sites

I was thinking about that solution before, but I have one big file and only few small textures, so it wouldn't look rightly I think. So I see two ways:
1) make fake loading progress using setInterval() and variable with logarithmic increase.
2) Change AssetManager to SceneLoader.

Thank you very much @Wingnut and @Deltakosh!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.