diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs index 446605b43e4f8..333d8e2e9bbc7 100644 --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -37,7 +37,7 @@ use bevy_ecs::{ component::Component, entity::Entity, query::{ROQueryItem, Without}, - reflect::ReflectComponent, + reflect::{ReflectComponent, ReflectResource}, schedule::IntoSystemConfigs, system::{ lifetimeless::{Read, SRes}, @@ -77,7 +77,9 @@ impl Plugin for GizmoPlugin { fn build(&self, app: &mut bevy_app::App) { load_internal_asset!(app, LINE_SHADER_HANDLE, "lines.wgsl", Shader::from_wgsl); - app.add_plugins(UniformComponentPlugin::::default()) + app.register_type::() + .register_type::() + .add_plugins(UniformComponentPlugin::::default()) .init_asset::() .add_plugins(RenderAssetPlugin::::default()) .init_resource::() @@ -135,7 +137,8 @@ impl Plugin for GizmoPlugin { } /// A [`Resource`] that stores configuration for gizmos. -#[derive(Resource, Clone)] +#[derive(Resource, Clone, Reflect)] +#[reflect(Resource)] pub struct GizmoConfig { /// Set to `false` to stop drawing gizmos. /// @@ -188,7 +191,7 @@ impl Default for GizmoConfig { } /// Configuration for drawing the [`Aabb`] component on entities. -#[derive(Clone, Default)] +#[derive(Clone, Default, Reflect)] pub struct AabbGizmoConfig { /// Draws all bounding boxes in the scene when set to `true`. ///