Skip to content

Commit a48805f

Browse files
janhohenheimmockersf
authored andcommitted
Make DirectionalLight Copy (#21268)
# Objective - `PointLight` and `SpotLight` are both `Copy`, but `DirectionalLight` isn't. ## Solution - Make it `Copy`. It's also a light, and the struct is comparable in size to the others ## Testing - CI ## Additional info Noticed this while implementing a CPU estimate of Bevy's lighting for the visibility calculations in a stealth system
1 parent a137fcb commit a48805f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_light/src/directional_light.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use super::{
5555
/// change the [`CascadeShadowConfig`] component of the entity with the [`DirectionalLight`].
5656
///
5757
/// To control the resolution of the shadow maps, use the [`DirectionalLightShadowMap`] resource.
58-
#[derive(Component, Debug, Clone, Reflect)]
58+
#[derive(Component, Debug, Clone, Copy, Reflect)]
5959
#[reflect(Component, Default, Debug, Clone)]
6060
#[require(
6161
Cascades,

0 commit comments

Comments
 (0)