-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
False positives for Added/Changed on first system run #13426
Comments
Definitely a bug. I wonder if we should be storing an Although simply swapping to u64 ticks may be enough to fix this. |
Hmm, how would that help here? |
Oh, I see the problem here. I think the docs are wrong. The actual behavior (and the one that will generally be desired) is "detect added/changed components exactly once". Is there are reason why you want to exclude entities that were added before the system was run? |
Yes: Because the system isn't active from the beginning. I do think this is useful behavior. But I can work around this by checking |
# Objective Fixes #13426 ## Solution Correct documentation to describe current behavior --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Bevy version
2aed777
What you did
I spawned an entity with a component:
Then ran a system that checks whether said component has been added since the last time it ran:
What went wrong
From the documentation of
Added
:(and similarly for
Changed
: "[…] or mutably dereferenced after the system last ran.")This never happened, yet the entity did not get filtered out the first time the system ran.
Additional information
SystemMeta::last_run
can not represent the case that the system hasn't been run yet and therefore falsely gets initialized to 0.The text was updated successfully, but these errors were encountered: