From 86c965e102581779443b7f1df8412e544fbe1417 Mon Sep 17 00:00:00 2001 From: Jan Hohenheim Date: Thu, 7 Mar 2024 14:57:53 +0100 Subject: [PATCH 1/2] Fix crash --- crates/bevy_gltf_blueprints/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_gltf_blueprints/src/lib.rs b/crates/bevy_gltf_blueprints/src/lib.rs index 366f05f..dc9226e 100644 --- a/crates/bevy_gltf_blueprints/src/lib.rs +++ b/crates/bevy_gltf_blueprints/src/lib.rs @@ -150,7 +150,7 @@ impl Plugin for BlueprintsPlugin { .in_set(GltfBlueprintsSet::Spawn), ) .add_systems( - Update, + PostUpdate, (spawned_blueprint_post_process, apply_deferred) .chain() .in_set(GltfBlueprintsSet::AfterSpawn), From 04a8ebcd4a672b467b6159523aa2e91b14d57b2d Mon Sep 17 00:00:00 2001 From: Jan Hohenheim Date: Thu, 7 Mar 2024 18:10:57 +0100 Subject: [PATCH 2/2] Fix post processing not affecting visibility of entities --- crates/bevy_gltf_blueprints/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/bevy_gltf_blueprints/src/lib.rs b/crates/bevy_gltf_blueprints/src/lib.rs index dc9226e..bb8aa7e 100644 --- a/crates/bevy_gltf_blueprints/src/lib.rs +++ b/crates/bevy_gltf_blueprints/src/lib.rs @@ -19,7 +19,11 @@ pub use copy_components::*; use core::fmt; use std::path::PathBuf; -use bevy::{prelude::*, render::primitives::Aabb, utils::HashMap}; +use bevy::{ + prelude::*, + render::{primitives::Aabb, view::VisibilitySystems}, + utils::HashMap, +}; use bevy_gltf_components::{ComponentsFromGltfPlugin, GltfComponentsSet}; #[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)] @@ -153,7 +157,8 @@ impl Plugin for BlueprintsPlugin { PostUpdate, (spawned_blueprint_post_process, apply_deferred) .chain() - .in_set(GltfBlueprintsSet::AfterSpawn), + .in_set(GltfBlueprintsSet::AfterSpawn) + .before(VisibilitySystems::CheckVisibility), ); } }