-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unity JobSystem schedule pattern #7773
Comments
You can already do this with
|
Well, are the codes behind ecs system and task the same, with equal optimizations? Like vectorization and so on. |
Unlike Unity, we use the same compiler for every part of the produced binary. Enabling higher optimization levels and LTO (as does Unity's Burst compiler), will result in them applying universally. As for the backing implementation for ECS systems and tasks, they're identical. ECS systems are tasks running on the same implementation of task executors underneath it all. The main difference is that we segregate the available threads into segments for use case. These currently include Compute (where ECS systems run), Async Compute (where long running CPU-bound operations should run), and IO (short-lived IO bound tasks). This is to prevent longer blocking tasks, like those in Async Compute, from blocking more latency sensitive operations in IO and Compute. |
Beyond the documentation and use case of tasks, this issue is probably inactionable. We can definitely expose a more unity-like API for tasks, or a third-party crate can definitely do so, but the core functionality necessary here is already in the engine. Closing this out for now. Feel free to repoen if you feel strongly that we should change the tasks API to either match Unity's or is insufficient for fulfilling your use case. |
What problem does this solve or what need does it fill?
Sometimes I don't really need the ECS framework but only need the schedule, for example:
What solution would you like?
Let the user have the ability to fully determine the behavior of the scheduling tool.
Example:
What alternative(s) have you considered?
#4090 I find the method run_schedule in this issue useful but the current World struct doesn't have it in bevy 0.9.1.
#7707 use commands to add one-shot systems but it seems only to support sequential execution.
The text was updated successfully, but these errors were encountered: