Skip to content

Commit 3d194a2

Browse files
committed
Add missing type registrations for bevy_math types (bevyengine#5758)
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.
1 parent 3817afc commit 3d194a2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

crates/bevy_core/src/lib.rs

+18
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,29 @@ fn register_math_types(app: &mut App) {
5757
.register_type::<bevy_math::UVec2>()
5858
.register_type::<bevy_math::UVec3>()
5959
.register_type::<bevy_math::UVec4>()
60+
.register_type::<bevy_math::DVec2>()
61+
.register_type::<bevy_math::DVec3>()
62+
.register_type::<bevy_math::DVec4>()
63+
.register_type::<bevy_math::BVec2>()
64+
.register_type::<bevy_math::BVec3>()
65+
.register_type::<bevy_math::BVec3A>()
66+
.register_type::<bevy_math::BVec4>()
67+
.register_type::<bevy_math::BVec4A>()
6068
.register_type::<bevy_math::Vec2>()
6169
.register_type::<bevy_math::Vec3>()
70+
.register_type::<bevy_math::Vec3A>()
6271
.register_type::<bevy_math::Vec4>()
72+
.register_type::<bevy_math::DAffine2>()
73+
.register_type::<bevy_math::DAffine3>()
74+
.register_type::<bevy_math::Affine2>()
75+
.register_type::<bevy_math::Affine3A>()
76+
.register_type::<bevy_math::DMat2>()
77+
.register_type::<bevy_math::DMat3>()
78+
.register_type::<bevy_math::DMat4>()
6379
.register_type::<bevy_math::Mat2>()
6480
.register_type::<bevy_math::Mat3>()
81+
.register_type::<bevy_math::Mat3A>()
6582
.register_type::<bevy_math::Mat4>()
83+
.register_type::<bevy_math::DQuat>()
6684
.register_type::<bevy_math::Quat>();
6785
}

0 commit comments

Comments
 (0)