Closed darkautism closed 11 months ago
You are inserting the ldtk
asset in a loop over all level events. Have you debugged that you get such an event and insert the dynamic asset before the loading state starts on WASM?
I write a new state to prevent this bug. LoadLdtk -> AssetLoading - > Playing. This flow also work on wasm. :-)
In some case we cannot know which assets we should load in compile time. I have an ldtk project and it containe a lot of image so i need this crate to help me to manage this. I write a ldtk event to track all file should load in current level and it work perfect in PC envirement.
First i write a assets with ldtk key. I set vec type as UntypedHandle because i do not really want to use theme i just want to be sure all of assets should loaded befor game start.
Second i iterate all of entity in current level and add all Filepath type into a vec and register as dynamic assets.
That progress work very good in PC but it seems not work in wasm:
What can i do?