Skip to content

Commit

Permalink
bevy_reflect: Add missing primitive registrations (bevyengine#7815)
Browse files Browse the repository at this point in the history
# Objective

There were a couple primitive types missing from the default `TypeRegistry` constructor.

## Solution

Added the missing registrations for `char` and `String`.
  • Loading branch information
MrGVSV authored and Shfty committed Mar 19, 2023
1 parent ed7b3b6 commit bb91af6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bevy_reflect/src/type_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl TypeRegistry {
pub fn new() -> Self {
let mut registry = Self::empty();
registry.register::<bool>();
registry.register::<char>();
registry.register::<u8>();
registry.register::<u16>();
registry.register::<u32>();
Expand All @@ -87,6 +88,7 @@ impl TypeRegistry {
registry.register::<isize>();
registry.register::<f32>();
registry.register::<f64>();
registry.register::<String>();
registry
}

Expand Down

0 comments on commit bb91af6

Please sign in to comment.