-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add RenderSet::FinalCleanup
for World::clear_entities
#14764
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
Conversation
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.
Kinda gross, but retained rendering world will fix it (and give very nice perf improvements!)
Nit: |
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.
Don't forget to update the migration guide 👍
I actually dislike PostCleanup more, as it implies that all cleanup is actually done and that it's not doing cleanup itself... But this whole thing is sucky, and hopefully fixed soon. We really need to get retained render world merged asap imo. |
Objective
World::clear_entities
is ambiguous with all of the other systems inRenderSet::Cleanup
because it access&mut World
.Solution
I've added another system set variant, and made sure that this runs after everything else.
Testing
The
ambiguity_detection
exampleMigration Guide
World::clear_entities
is now part ofRenderSet::PostCleanup
rather thanRenderSet::Cleanup
. Your cleanup systems should likely stay inRenderSet::Cleanup
.Additional context
Spotted when working on #7386: this was responsible for a large number of ambiguities.
This should be removed if / when #14449 is merged: there's no need to call
clear_entities
at all if the rendering world is retained!