Is there a more granular way to track changes? #2526
Answered
by
mockersf
SarthakSingh31
asked this question in
Q&A
-
I have a struct: pub enum GameScene {
Menu,
Build {
loaded: bool,
builds: Vec<unit::build::Build>,
parts: Option<unit::build::AllParts>,
textures: Vec<Handle<Texture>>,
},
Fight { level: level::Level, mode: FightMode },
GameOver,
} I can track changes on I don't want to manually track the change because then I will have to use |
Beta Was this translation helpful? Give feedback.
Answered by
mockersf
Jul 24, 2021
Replies: 1 comment 1 reply
-
Bevy change detection is on resource level, so no, no built in more granular way... That said:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
SarthakSingh31
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bevy change detection is on resource level, so no, no built in more granular way...
That said:
ResMut<GameScene>
to update change tracking only when you update the resource, so you should already have aResMut
?