Skip to content

Commit

Permalink
Register missing types in bevy_window (#7993)
Browse files Browse the repository at this point in the history
# Objective

-  Fixes #7990.

## Solution

- Register needed types, verified pasted code in issue works.

Do I need to register more `Option<T>` types?
  • Loading branch information
lewiszlw committed Mar 27, 2023
1 parent 5e5a305 commit 8ff7e0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ fn register_rust_types(app: &mut App) {
.register_type::<OsString>()
.register_type::<HashSet<String>>()
.register_type::<Option<String>>()
.register_type::<Option<bool>>()
.register_type::<Option<f64>>()
.register_type::<Cow<'static, str>>()
.register_type::<Duration>()
.register_type::<Instant>();
Expand All @@ -68,6 +70,7 @@ fn register_math_types(app: &mut App) {
.register_type::<bevy_math::UVec3>()
.register_type::<bevy_math::UVec4>()
.register_type::<bevy_math::DVec2>()
.register_type::<Option<bevy_math::DVec2>>()
.register_type::<bevy_math::DVec3>()
.register_type::<bevy_math::DVec4>()
.register_type::<bevy_math::BVec2>()
Expand Down
4 changes: 4 additions & 0 deletions crates/bevy_window/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,13 @@ impl Plugin for WindowPlugin {
// Register window descriptor and related types
app.register_type::<Window>()
.register_type::<Cursor>()
.register_type::<CursorIcon>()
.register_type::<CursorGrabMode>()
.register_type::<CompositeAlphaMode>()
.register_type::<WindowResolution>()
.register_type::<WindowPosition>()
.register_type::<WindowMode>()
.register_type::<WindowLevel>()
.register_type::<PresentMode>()
.register_type::<InternalWindowState>()
.register_type::<MonitorSelection>()
Expand Down

0 comments on commit 8ff7e0d

Please sign in to comment.