From 2c055a27c288835dc89d9ef72772caae8efb8cf8 Mon Sep 17 00:00:00 2001 From: Gino Valente Date: Wed, 23 Nov 2022 00:41:21 +0000 Subject: [PATCH] bevy_reflect: Register missing reflected types for `bevy_render` (#6725) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective Many types in `bevy_render` implemented `Reflect` but were not registered. ## Solution Register all types in `bevy_render` that impl `Reflect`. This also registers additional dependent types (i.e. field types). > Note: Adding these dependent types would not be needed using something like #5781 😉 --- ## Changelog - Register missing `bevy_render` types in the `TypeRegistry`: - `camera::RenderTarget` - `globals::GlobalsUniform` - `texture::Image` - `view::ComputedVisibility` - `view::Visibility` - `view::VisibleEntities` - Register additional dependent types: - `view::ComputedVisibilityFlags` - `Vec` --- crates/bevy_render/src/view/visibility/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index c08df608985d1..cfa85157a6270 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -56,7 +56,7 @@ impl Visibility { bitflags::bitflags! { #[derive(Reflect)] - struct ComputedVisibilityFlags: u8 { + pub(super) struct ComputedVisibilityFlags: u8 { const VISIBLE_IN_VIEW = 1 << 0; const VISIBLE_IN_HIERARCHY = 1 << 1; }