diff --git a/crates/bevy_transform/src/components/global_transform.rs b/crates/bevy_transform/src/components/global_transform.rs index 627862d94b20b..ebfdf3ae2e16a 100644 --- a/crates/bevy_transform/src/components/global_transform.rs +++ b/crates/bevy_transform/src/components/global_transform.rs @@ -3,7 +3,7 @@ use std::ops::Mul; use super::Transform; use bevy_ecs::{component::Component, reflect::ReflectComponent}; use bevy_math::{Affine3A, Mat4, Quat, Vec3, Vec3A}; -use bevy_reflect::Reflect; +use bevy_reflect::{FromReflect, Reflect}; /// Describe the position of an entity relative to the reference frame. /// @@ -31,7 +31,7 @@ use bevy_reflect::Reflect; /// - [`global_vs_local_translation`] /// /// [`global_vs_local_translation`]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/global_vs_local_translation.rs -#[derive(Component, Debug, PartialEq, Clone, Copy, Reflect)] +#[derive(Component, Debug, PartialEq, Clone, Copy, Reflect, FromReflect)] #[reflect(Component, PartialEq)] pub struct GlobalTransform(Affine3A); diff --git a/crates/bevy_transform/src/components/transform.rs b/crates/bevy_transform/src/components/transform.rs index 2aafd3ff2fd04..a4330bab01f96 100644 --- a/crates/bevy_transform/src/components/transform.rs +++ b/crates/bevy_transform/src/components/transform.rs @@ -34,7 +34,7 @@ use std::ops::Mul; /// /// [`global_vs_local_translation`]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/global_vs_local_translation.rs /// [`transform`]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs -#[derive(Component, Debug, PartialEq, Clone, Copy, Reflect)] +#[derive(Component, Debug, PartialEq, Clone, Copy, Reflect, FromReflect)] #[reflect(Component, Default, PartialEq)] pub struct Transform { /// Position of the entity. In 2d, the last value of the `Vec3` is used for z-ordering.