Skip to content

Commit b6bd205

Browse files
authored
Gate Reflect derive behind feature flag (#19745)
# Objective Fix #19733 ## Solution Gate reflect features behind `feature(bevy_reflect)` ## Tests None
1 parent d2e1f72 commit b6bd205

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

crates/bevy_window/src/window.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,13 +1168,17 @@ pub enum MonitorSelection {
11681168
/// References an exclusive fullscreen video mode.
11691169
///
11701170
/// Used when setting [`WindowMode::Fullscreen`] on a window.
1171-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Reflect)]
1171+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1172+
#[cfg_attr(
1173+
feature = "bevy_reflect",
1174+
derive(Reflect),
1175+
reflect(Debug, PartialEq, Clone)
1176+
)]
1177+
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
11721178
#[cfg_attr(
1173-
feature = "serialize",
1174-
derive(serde::Serialize, serde::Deserialize),
1179+
all(feature = "serialize", feature = "bevy_reflect"),
11751180
reflect(Serialize, Deserialize)
11761181
)]
1177-
#[reflect(Debug, PartialEq, Clone)]
11781182
pub enum VideoModeSelection {
11791183
/// Uses the video mode that the monitor is already in.
11801184
Current,

0 commit comments

Comments
 (0)