Skip to content

Commit

Permalink
Overwrite gizmo group in insert_gizmo_group
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Feb 14, 2024
1 parent ebf81c6 commit fb1093a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/bevy_gizmos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,17 @@ impl AppGizmoBuilder for App {
group: T,
config: GizmoConfig,
) -> &mut Self {
self.world
.get_resource_or_insert_with::<GizmoConfigStore>(Default::default)
.insert(config, group);

if self.world.contains_resource::<GizmoStorage<T>>() {
return self;
}

self.init_resource::<GizmoStorage<T>>()
.add_systems(Last, update_gizmo_meshes::<T>);

self.world
.get_resource_or_insert_with::<GizmoConfigStore>(Default::default)
.insert(config, group);

let Ok(render_app) = self.get_sub_app_mut(RenderApp) else {
return self;
};
Expand Down

0 comments on commit fb1093a

Please sign in to comment.