Skip to content

Commit

Permalink
Add missing type registrations for bevy_math types (bevyengine#5758)
Browse files Browse the repository at this point in the history
Type registrations were only present for some of the `bevy_math` types, and missing for others. This is a very strange inconsistency, given that they all impl `Reflect` and `FromReflect`. In practice, this means these types cannot be used in scenes.

In particular, this is especially problematic, because `Affine3A` is one of the missing types, and it is now used in `GlobalTransform`. Trying to create a bevy scene that contains `GlobalTransform`s results in an error due to the missing type registration.
  • Loading branch information
inodentry authored and maccesch committed Sep 28, 2022
1 parent ac5590e commit 6dddc91
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions crates/bevy_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,29 @@ fn register_math_types(app: &mut App) {
.register_type::<bevy_math::UVec2>()
.register_type::<bevy_math::UVec3>()
.register_type::<bevy_math::UVec4>()
.register_type::<bevy_math::DVec2>()
.register_type::<bevy_math::DVec3>()
.register_type::<bevy_math::DVec4>()
.register_type::<bevy_math::BVec2>()
.register_type::<bevy_math::BVec3>()
.register_type::<bevy_math::BVec3A>()
.register_type::<bevy_math::BVec4>()
.register_type::<bevy_math::BVec4A>()
.register_type::<bevy_math::Vec2>()
.register_type::<bevy_math::Vec3>()
.register_type::<bevy_math::Vec3A>()
.register_type::<bevy_math::Vec4>()
.register_type::<bevy_math::DAffine2>()
.register_type::<bevy_math::DAffine3>()
.register_type::<bevy_math::Affine2>()
.register_type::<bevy_math::Affine3A>()
.register_type::<bevy_math::DMat2>()
.register_type::<bevy_math::DMat3>()
.register_type::<bevy_math::DMat4>()
.register_type::<bevy_math::Mat2>()
.register_type::<bevy_math::Mat3>()
.register_type::<bevy_math::Mat3A>()
.register_type::<bevy_math::Mat4>()
.register_type::<bevy_math::DQuat>()
.register_type::<bevy_math::Quat>();
}

0 comments on commit 6dddc91

Please sign in to comment.