Maybe the title is a bit inaccurate, but I had trouble rendering text in my game. I looked at the network requests, and saw that the font assets were never requests. Weirdly enough, moving the App::run call out of the async function where I normally start bevy seems to fix the issue.
I guess that perhaps running App::run(), which is a blocking call, inside an async function is probably making some other async task unhappy... The only problem is, I don't really understand how to solve this. How can I do async setup before starting bevy if bevy can't be started from an async task and webgl2 doesn't support proper threads?
Maybe the title is a bit inaccurate, but I had trouble rendering text in my game. I looked at the network requests, and saw that the font assets were never requests. Weirdly enough, moving the
App::run
call out of the async function where I normally start bevy seems to fix the issue.I.e. this is what I did before:
And this is what works:
I guess that perhaps running App::run(), which is a blocking call, inside an async function is probably making some other async task unhappy... The only problem is, I don't really understand how to solve this. How can I do async setup before starting bevy if bevy can't be started from an async task and webgl2 doesn't support proper threads?