When I was using the AssetLoader in only one Plugin everything went fine. But as soon as I added asset collection loading to the other, I believe the GameState::Level was entered too soon and made my code panic since all the assets were not loaded yet.
It kinda looks like a race condition between each AssetLoader.
I thought when declaring more than one AssetLoader on a given state, it would aggregate all the collections needed, wait for all of them to load, and then transition to the given state.
Hello,
I am currently trying to apply clean asset loading to two of my
Plugin
.As per the guide, I am initializing a loopless_state with
app.add_loopless_state(GameState::Loading)
before using any of my plugins.I am doing the following :
In MeteorPlugin :
In ShipPlugin :
When I was using the AssetLoader in only one Plugin everything went fine. But as soon as I added asset collection loading to the other, I believe the
GameState::Level
was entered too soon and made my code panic since all the assets were not loaded yet.It kinda looks like a race condition between each AssetLoader.
I thought when declaring more than one AssetLoader on a given state, it would aggregate all the collections needed, wait for all of them to load, and then transition to the given state.
Thank you for your time!