Why does bevy::render::render_graph::Node::update()
take a mut World
?
#10283
Unanswered
waywardmonkeys
asked this question in
Q&A
Replies: 1 comment
-
I guess you are right that it's not currently used internally, but the intention of having both |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The docs for
bevy::render::render_graph::Node::update()
say:It has the signature
fn update(&mut self, _world: &mut World)
So while the docs say that it is updating the node's internal state, it does get a mutable
World
. None of the code within the repository uses it mutably (I have a patch that experimentally makes it take&World
instead), so I'm curious why it ismut
?Is it because someone might legitimately want to mutate the world in that function?
Is it because of some historical legacy?
If for some reason, I did want to mutate the world, would that be fine to do there or might that cause some other issue?
Beta Was this translation helpful? Give feedback.
All reactions