-
-
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
Add .with_system_set method to SystemSet #2722
Comments
Hi, looking into this. Two questions:
|
Hmm. Prioritize self IMO? That will need to be clearly documented though.
I don't mind implicit cloning here: this should be a one-time cost. IMO we should try to |
wrt implementing |
Hmm. I think we should table this for the moment then; we can review it as the schedule and state story improves. |
You can't clone systems - there is, ordinarily, no point to doing that, and adding that restriction just for the sake of this API isn't a good idea. This is not going to "improve" in the future. What might be possible instead: introduce a |
I think other scenarios tie in to this:
We already have ways to address systems:
Maybe we need a way to say things like:
|
They do, but this issue is kind of structured around the idea of cloning the systems. To me, a good solution for those would be a dedicated out-of-schedule storage for systems, indexed by labels and/or a kind of a unique key (system name?).
We've been referring to this as "label properties": i.e., do things to systems by doing things to their labels. I don't think this is feasible to implement until we untangle the stages/states/lifecycle doom triangle, we need a completely flat systems storage if we want to do this sanely. |
SystemSets, as used prior to stageless, no longer exist. Closing this issue for now. |
What problem does this solve or what need does it fill?
Reusing system sets is currently challenging: users may for example want to run a collection of systems in several states at once.
What solution would you like?
Add
with_system_set
to matchwith_system
on theSystemSet
struct.What alternative(s) have you considered?
More completely overhaul / reorganize system sets and scheduling.
Additional context
This should be relatively straightforward for newcomers who want to get to know the ECS a bit better. Follow the impl here:
bevy/crates/bevy_ecs/src/schedule/system_set.rs
Line 94 in c893b99
and push the systems from the new system set into
self
's corresponding field instead.The text was updated successfully, but these errors were encountered: