From a4bb56355ed52796e8900f74a0c5b65b8d9c1e48 Mon Sep 17 00:00:00 2001 From: Franklin Date: Sun, 24 Mar 2024 15:19:56 +0100 Subject: [PATCH] Added despawn descendants after scene is done --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/update.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa20543..dabd80e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -608,7 +608,7 @@ dependencies = [ [[package]] name = "bevy_icon_creator" -version = "0.1.5" +version = "0.1.6" dependencies = [ "bevy", ] diff --git a/Cargo.toml b/Cargo.toml index d499a9a..aefb026 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_icon_creator" -version = "0.1.5" +version = "0.1.6" edition = "2021" authors = ["Franklin E. Blanco"] description = "A plugin to automatically create Icons from entities/models in bevy" diff --git a/src/update.rs b/src/update.rs index 2e2fbc1..500b596 100644 --- a/src/update.rs +++ b/src/update.rs @@ -42,6 +42,7 @@ pub fn update_icon_creator_scenes( scene_camera.is_active = false; *scene_root_visibility = Visibility::Hidden; scene_camera.target = RenderTarget::default(); + entity_commands.despawn_descendants(); } } }