-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Asset re-loading while it's being deleted #2011
Conversation
Co-Authored-By: Nathan Ward <43621845+NathanSWard@users.noreply.github.com>
I believe this PR could be marked as |
Looks good to me / behaves as expected in my tests: Despawning a SpriteBundle entity with a texture material:
|
This does imply that deeply nested dependency chains will now take longer to free up resources. Ex: something with 30 nested dependencies will be freed over the course of |
bors r+ |
Pull request successfully merged into main. Build succeeded: |
If that becomes an issue, the number of frames spent can be divided by 2 by marking unused assets in a separate system at the end of the frame, after all handles have been freed |
fixes bevyengine#824 fixes bevyengine#1956 * marked asset loading methods as `must_use` * fixed asset re-loading while asset is still loading to work as comment is describing code * introduced a 1 frame delay between unused asset marking and actual asset removal
fixes #824
fixes #1956
must_use