From 03bc434891f8bd8fd70cabdac79f987ef3447763 Mon Sep 17 00:00:00 2001 From: Noah Date: Wed, 5 Oct 2022 03:49:14 -0400 Subject: [PATCH 1/4] Registers Option in Bevy_Render CameraPlugin and ReflectSerialize and ReflectDeserialize for type data Range in Bevy_Core CorePlugin --- crates/bevy_core/src/lib.rs | 6 +++++- crates/bevy_render/src/camera/mod.rs | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index 8fc580848fce9..7f25dcd969663 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -20,6 +20,7 @@ use bevy_ecs::entity::Entity; use bevy_utils::{Duration, HashSet, Instant}; use std::borrow::Cow; use std::ops::Range; +use bevy_reflect::{ReflectDeserialize, ReflectSerialize}; /// Adds core functionality to Apps. #[derive(Default)] @@ -34,7 +35,10 @@ impl Plugin for CorePlugin { .unwrap_or_default() .create_default_pools(); - app.register_type::().register_type::(); + app. + register_type::().register_type::() + .register_type_data::, ReflectSerialize>() + .register_type_data::, ReflectDeserialize>(); register_rust_types(app); register_math_types(app); diff --git a/crates/bevy_render/src/camera/mod.rs b/crates/bevy_render/src/camera/mod.rs index fbaed28a8f3ae..b96aeb9a5047b 100644 --- a/crates/bevy_render/src/camera/mod.rs +++ b/crates/bevy_render/src/camera/mod.rs @@ -22,6 +22,7 @@ impl Plugin for CameraPlugin { fn build(&self, app: &mut App) { app.register_type::() .register_type::() + .register_type::>() .register_type::() .register_type::() .register_type::() From 27bd27c956bdfd808a294e3df13811521cc71790 Mon Sep 17 00:00:00 2001 From: Noah Date: Wed, 5 Oct 2022 03:56:48 -0400 Subject: [PATCH 2/4] fixed out of place period in bevy_core CorePlugin --- crates/bevy_core/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index 7f25dcd969663..39124b71f4ecf 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -35,8 +35,8 @@ impl Plugin for CorePlugin { .unwrap_or_default() .create_default_pools(); - app. - register_type::().register_type::() + app + .register_type::().register_type::() .register_type_data::, ReflectSerialize>() .register_type_data::, ReflectDeserialize>(); From e6ddc58fee0bfaaedd43ae559f3ef6c3c92e6f33 Mon Sep 17 00:00:00 2001 From: Noah Date: Thu, 6 Oct 2022 01:13:57 -0400 Subject: [PATCH 3/4] Fixes failing overwriting test for bevy_core Core_plugin --- crates/bevy_core/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index 39124b71f4ecf..eaefd1f3d3a0d 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -36,7 +36,9 @@ impl Plugin for CorePlugin { .create_default_pools(); app - .register_type::().register_type::() + .register_type::() + .register_type::() + .register_type::>() .register_type_data::, ReflectSerialize>() .register_type_data::, ReflectDeserialize>(); From 1a8432f1fe5db47f02c421a102a2b7573e42fb60 Mon Sep 17 00:00:00 2001 From: Noah Date: Thu, 6 Oct 2022 01:16:14 -0400 Subject: [PATCH 4/4] fixes formatting --- crates/bevy_core/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index eaefd1f3d3a0d..58ece9d81f111 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -17,10 +17,10 @@ pub mod prelude { use bevy_app::prelude::*; use bevy_ecs::entity::Entity; +use bevy_reflect::{ReflectDeserialize, ReflectSerialize}; use bevy_utils::{Duration, HashSet, Instant}; use std::borrow::Cow; use std::ops::Range; -use bevy_reflect::{ReflectDeserialize, ReflectSerialize}; /// Adds core functionality to Apps. #[derive(Default)] @@ -35,8 +35,7 @@ impl Plugin for CorePlugin { .unwrap_or_default() .create_default_pools(); - app - .register_type::() + app.register_type::() .register_type::() .register_type::>() .register_type_data::, ReflectSerialize>()