-
I want to do a couple of long running tasks using bevy:
I am not really experienced with async programming, so from the async examples I figured, that I can either put the work in a thread and do all the work myself, or I use the The bevy_tasks examples do not seem very useful either for my case. So here is my question: How is
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
From the discussion on discord:
|
Beta Was this translation helpful? Give feedback.
From the discussion on discord:
futures_lite::future::block_on(futures_lite::future::poll_once(&mut *task))
makes sense.if task.finished { despawn task entity }
is not so easy, because then bevy would need a whole system to do that. Maybe that could be solved by a prebuilt plugin, that processes certain Components, and then despawns them and sends an event out, so that the consumer can listen to some kind of "finished task" events.