Upgrade to Bevy 0.17.0 (alternative/minimal) - #52
Conversation
|
Thanks for your help @mgi388! I'm a bit overwhelmed at work at the moment, so I won't be able to look at the two blocking issues for now, unfortunately. Using your fork of iyes_perf_ui sounds good to me (it's only used in a single example anyway). |
74c6ced to
3580127
Compare
|
I removed iyes_perf_ui in favor of Bevy's built-in FPS overlay so using a fork won't be necessary anymore. |
|
@mgi388 I updated the crate to Bevy 0.17 with the help of your PR. |
|
@merwaaan awesome! Close these when ready. Interested to see what the fixes are. |
|
The crate now supports Bevy 0.17. I started from your initial upgrade so thank you 🙂 Regarding the 3D sprite issue, it was due to the way we swapped meshes/materials when playing an animation. Before Bevy 0.17: With Bevy 0.17 meshes get immediately deleted as if the remove() call unexpectedly applies to the new mesh. Regarding the headless example crashing, I switched the crate's systems to use Options for resources that might not exist depending on the context (headless, not all default plugins enabled, etc...) From To (An alternative would have been to use conditional |
|
@merwaaan regarding the headless example. I started to look at it as well and I think your fix does result in it compiling again but I don’t know if it’s the right fix. The reason is that event reader is listening for asset changed events on StandardMaterial. Of course bevy_spritesheet_animation uses StandardMaterial extensively. However, StandardMaterial doesn’t really exist in the minimal set of plugins (as far as I can tell). It does exist in the sense that the type is there, but I don’t think it’s a registered asset unless a specific plug-in is added. I tried to follow the dependency chain of plugins required to make it work but I basically ended up back at DefaultPlugins. Up to you if you want to look further or leave as is. But my approach was going to be to just delete the example and notify the original author they should look into it. I’m fine either way though, I don’t use a headless setup right now. |
|
@mgi388 Indeed those resources might not exist with minimal plugins but as long as the types are known this compiles and runs ok. I was expecting the Option<> strategy to fail but Bevy seems to support it. In practice, I'm not sure we actually have users for this use-case anymore so let's wait and see if anyone encounter issues and/or complains. |
This is an alternative (and also WIP) to #49 with minimal changes. It leaves the "event/message" rename for later so that the PR is easier to review.
Like in #49, this PR:
clone_weaktocloneis acceptable/correct. If I had to guess, this could be the reason the 3d example doesn't work.PRs/fixes to this PR are welcome.
@merwaaan feel free to push to it if you have ideas. I didn't look at the sprite 3d issue properly but maybe you know quicker than I do what is up.