diff --git a/crates/bevy_pbr/src/extended_material.rs b/crates/bevy_pbr/src/extended_material.rs index 70f9ec34cc903..60ac6c2fa8165 100644 --- a/crates/bevy_pbr/src/extended_material.rs +++ b/crates/bevy_pbr/src/extended_material.rs @@ -128,6 +128,20 @@ pub struct ExtendedMaterial { pub extension: E, } + +impl Default for ExtendedMaterial + where + B: Material + Default, + E: MaterialExtension + Default, +{ + fn default() -> Self { + Self { + base: B::default(), + extension: E::default(), + } + } +} + // We don't use the `TypePath` derive here due to a bug where `#[reflect(type_path = false)]` // causes the `TypePath` derive to not generate an implementation. impl_type_path!((in bevy_pbr::extended_material) ExtendedMaterial);