-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Generic hierarchy propagate #22043
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
base: main
Are you sure you want to change the base?
Generic hierarchy propagate #22043
Conversation
| nodes: &NodeQuery<'_, '_, T>, | ||
| ) { | ||
| #[cfg(feature = "std")] | ||
| //let _span = bevy_log::info_span!("input propagation worker").entered(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just commented out because bevy_log isn't a dependency of bevy_ecs. Not sure if it's necessary to have it. bevy_log::info_span is only called once in entire codebase.
6d8860b to
fa31466
Compare
9951aae to
b1084ec
Compare
fix ci more lint more lint fmt fix lint unused mark fix lint fix lint fix again fix compile again
b1084ec to
cb43707
Compare
| hierarchy_propagate_simple::<Transform>, | ||
| hierarchy_propagate_complex::<Transform>, | ||
| ) | ||
| .chain(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to write fn hierarchy_down_propagate_chain(): ? { } I don't know that type should this be. I think only this should be pub, the systems should be private
| /// Propagates data down the hierarchy from parent to children (like transforms, visibility). | ||
| pub trait DownPropagate { | ||
| /// The input component type that contains the local data to be propagated. | ||
| type Input: Component; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to have Input: Bundle so we have multiple input components? I don't think so, does this means we need to have DownPropagate2 etc.
Objective
DownPropagate. Can be reused in other places.DownPropagateAll changes are very mechanical and I tried to not do any refactors that changes any logic. Easier to review by individual commits.
Solution
Testing