From 5d80ac3ded1e5f1544f15b97a47dd7386e25fa11 Mon Sep 17 00:00:00 2001 From: NiseVoid Date: Wed, 12 Mar 2025 18:57:20 +0100 Subject: [PATCH] Add derive Default to Disabled (#18275) # Objective - `#[require(Disabled)]` doesn't work as you'd expect ## Solution - `#[derive(Default)]` --- crates/bevy_ecs/src/entity_disabling.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/entity_disabling.rs b/crates/bevy_ecs/src/entity_disabling.rs index d4b1ad266c..a7da08af57 100644 --- a/crates/bevy_ecs/src/entity_disabling.rs +++ b/crates/bevy_ecs/src/entity_disabling.rs @@ -92,7 +92,7 @@ use {crate::reflect::ReflectComponent, bevy_reflect::Reflect}; /// See [the module docs] for more info. /// /// [the module docs]: crate::entity_disabling -#[derive(Component, Clone, Debug)] +#[derive(Component, Clone, Debug, Default)] #[cfg_attr( feature = "bevy_reflect", derive(Reflect),