Skip to content
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

Upgrade bevy to 0.15, purge bevy_mod_picking, github toolchain update. #86

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rydb
Copy link

@rydb rydb commented Jan 3, 2025

This pr includes several changes:

  • bevy_mod_picking removal:

as of 0.15, bevy_mod_picking has been upstreamed into bevy, and this library is likely no longer to be maintained. I removed it and related code and added a system system for selection behavior in the demo that required it.

  • tooling update

I updated the GitHub workflow and toolchain.toml to use rust 1.83.

  • bevy update.

building off of the work done in #85.

I finished the port to 0.15,

I also included the fix done in:
ActuallyHappening#1

@@ -85,7 +112,7 @@ fn extract_gizmo_data(mut commands: Commands, handles: Extract<Res<DrawDataHandl
.collect::<HashSet<_>>();

for handle in handle_weak_refs {
commands.spawn((handle,));
commands.spawn(GizmoDrawDataHandle(handle));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bevy 0.15 switched to a retained rendering world, meaning these entities never get despawned. Leaving the app running with the gizmo visible in the window will cause render entities to build up in the render world, creating more and more draw calls per frame until the app slows to a halt.

Without re-architecting this portion of the library to utilize retained entities, a simple fix is to also insert the TemporaryRenderEntity component. This will cause the entity to be despawned at the end of each frame.

commands.spawn((GizmoDrawDataHandle(handle), TemporaryRenderEntity));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants