-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Remove extra call to clear_trackers #13762
Merged
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2113106
Remove extra call to clear_trackers
chrisjuchem 8bb57f5
Added unit test
chrisjuchem d607f61
Clippy
chrisjuchem 5888bf2
Clippy again
chrisjuchem 4d44858
Delay clearing trackers on main world until after subapps are extract…
chrisjuchem 3d3b99d
update docs
chrisjuchem afba3c4
add another unit test for extraction
chrisjuchem a0e1ad5
clippy
chrisjuchem bc391d9
Merge branch 'main' into fix-13758
chrisjuchem 0b6e166
Merge branch 'main' into fix-13758
chrisjuchem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does removing this clear trackers rather than the other one mean that you can't use RemovedComponents in sub apps?
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.
RemovedComponents should still work the same for SubApps. clear_trackers is called once here per SubApp (the main app is also a SubApp internally): https://github.com/bevyengine/bevy/pull/13762/files/5888bf276daa1959eeb62671d1a8d6dd230eb6db#diff-1c2be7dcf5607cc6b3a4a9e664e9de0712a5ea313079b5451464513be643e747R136
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.
There was some confusion in the past that you couldn't use
Extract<RemovedComponents<T>>
in the extraction subapp. I believe this extra call is here, because the intention was to not clear the trackers at the end of the main app schedule to enable this.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.
Hmmm. If that's the case, then I think we would need another version of
update
For the main app that doesn't callclear_trackers
.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.
That sounds reasonable. But if it ends up being too involved, it might be better to merge this for 0.14 and fix it in a followup.
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.
Wasn't too bad at all once I came up with a test that caught the issue. I couldn't find any problems using RemovedComponents since it has a two frame buffer, but this this was an issue with regular change detection.