diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index 527332ab97def..bd4b54d4cef27 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -16,7 +16,7 @@ pub mod prelude { use bevy_app::prelude::*; use bevy_ecs::entity::Entity; -use bevy_utils::HashSet; +use bevy_utils::{Duration, HashSet, Instant}; use std::borrow::Cow; use std::ops::Range; @@ -45,7 +45,9 @@ fn register_rust_types(app: &mut App) { .register_type::() .register_type::>() .register_type::>() - .register_type::>(); + .register_type::>() + .register_type::() + .register_type::(); } fn register_math_types(app: &mut App) { diff --git a/crates/bevy_core_pipeline/src/core_3d/mod.rs b/crates/bevy_core_pipeline/src/core_3d/mod.rs index c69e8104dc15f..a78528b46f0f5 100644 --- a/crates/bevy_core_pipeline/src/core_3d/mod.rs +++ b/crates/bevy_core_pipeline/src/core_3d/mod.rs @@ -43,6 +43,7 @@ pub struct Core3dPlugin; impl Plugin for Core3dPlugin { fn build(&self, app: &mut App) { app.register_type::() + .register_type::() .add_plugin(ExtractComponentPlugin::::default()); let render_app = match app.get_sub_app_mut(RenderApp) { diff --git a/crates/bevy_core_pipeline/src/lib.rs b/crates/bevy_core_pipeline/src/lib.rs index 28304608e7661..0cc46286148d8 100644 --- a/crates/bevy_core_pipeline/src/lib.rs +++ b/crates/bevy_core_pipeline/src/lib.rs @@ -11,7 +11,11 @@ pub mod prelude { }; } -use crate::{clear_color::ClearColor, core_2d::Core2dPlugin, core_3d::Core3dPlugin}; +use crate::{ + clear_color::{ClearColor, ClearColorConfig}, + core_2d::Core2dPlugin, + core_3d::Core3dPlugin, +}; use bevy_app::{App, Plugin}; use bevy_render::extract_resource::ExtractResourcePlugin; @@ -21,6 +25,7 @@ pub struct CorePipelinePlugin; impl Plugin for CorePipelinePlugin { fn build(&self, app: &mut App) { app.register_type::() + .register_type::() .init_resource::() .add_plugin(ExtractResourcePlugin::::default()) .add_plugin(Core2dPlugin) diff --git a/crates/bevy_input/Cargo.toml b/crates/bevy_input/Cargo.toml index 3fc8b049fb241..e3f500db46e09 100644 --- a/crates/bevy_input/Cargo.toml +++ b/crates/bevy_input/Cargo.toml @@ -18,6 +18,7 @@ bevy_app = { path = "../bevy_app", version = "0.9.0-dev" } bevy_ecs = { path = "../bevy_ecs", version = "0.9.0-dev" } bevy_math = { path = "../bevy_math", version = "0.9.0-dev" } bevy_utils = { path = "../bevy_utils", version = "0.9.0-dev" } +bevy_reflect = { path = "../bevy_reflect", version = "0.9.0-dev" } # other serde = { version = "1", features = ["derive"], optional = true } diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 0bfd3c5a7de03..30fd1651f2145 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -23,7 +23,6 @@ use bevy_reflect::FromReflect; use bevy_transform::components::GlobalTransform; use bevy_utils::HashSet; use bevy_window::{WindowCreated, WindowId, WindowResized, Windows}; -use serde::{Deserialize, Serialize}; use std::{borrow::Cow, ops::Range}; use wgpu::Extent3d; @@ -32,9 +31,8 @@ use wgpu::Extent3d; /// The viewport defines the area on the render target to which the camera renders its image. /// You can overlay multiple cameras in a single window using viewports to create effects like /// split screen, minimaps, and character viewers. -// TODO: remove reflect_value when possible -#[derive(Reflect, FromReflect, Debug, Clone, Serialize, Deserialize)] -#[reflect_value(Default, Serialize, Deserialize)] +#[derive(Reflect, FromReflect, Debug, Clone)] +#[reflect(Default)] pub struct Viewport { /// The physical position to render this viewport to within the [`RenderTarget`] of this [`Camera`]. /// (0,0) corresponds to the top-left corner diff --git a/crates/bevy_render/src/camera/mod.rs b/crates/bevy_render/src/camera/mod.rs index 6004bb9cb7fe3..fbaed28a8f3ae 100644 --- a/crates/bevy_render/src/camera/mod.rs +++ b/crates/bevy_render/src/camera/mod.rs @@ -21,6 +21,7 @@ pub struct CameraPlugin; impl Plugin for CameraPlugin { fn build(&self, app: &mut App) { app.register_type::() + .register_type::() .register_type::() .register_type::() .register_type::() diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs index a7be1a4ab983b..bf0da021b8941 100644 --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -57,6 +57,7 @@ impl Plugin for SpritePlugin { shaders.set_untracked(SPRITE_SHADER_HANDLE, sprite_shader); app.add_asset::() .register_type::() + .register_type::() .register_type::() .add_plugin(Mesh2dRenderPlugin) .add_plugin(ColorMaterialPlugin); diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index 4dc1fc3b34070..36d727d408ae9 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -43,6 +43,8 @@ impl Plugin for TextPlugin { app.add_asset::() .add_asset::() .register_type::() + .register_type::() + .register_type::() .register_type::() .register_type::() .init_asset_loader::() diff --git a/crates/bevy_time/src/lib.rs b/crates/bevy_time/src/lib.rs index 7da0e54a07f75..018a760793c47 100644 --- a/crates/bevy_time/src/lib.rs +++ b/crates/bevy_time/src/lib.rs @@ -36,6 +36,8 @@ impl Plugin for TimePlugin { app.init_resource::