Skip to content

impl Clone for bevy_light Shader markers#23671

Open
ChristopherBiscardi wants to merge 1 commit intobevyengine:mainfrom
ChristopherBiscardi:shadow-receiver
Open

impl Clone for bevy_light Shader markers#23671
ChristopherBiscardi wants to merge 1 commit intobevyengine:mainfrom
ChristopherBiscardi:shadow-receiver

Conversation

@ChristopherBiscardi
Copy link
Copy Markdown
Contributor

Objective

Enable the use of NotShadowReceiver in bsn! by implementing Clone (Default is already implemented).

error[E0277]: the trait bound `NotShadowReceiver: Clone` is not satisfied
   --> src/spawn_circle.rs:375:27
    |
375 |           world.spawn_scene(bsn! {
    |  ___________________________^
376 | |             #SpawnCircle
377 | |             SpawnCircle
378 | |             SpawnEventToTrigger({self.event})
...   |
394 | |             )]
395 | |         });
    | |_________^ the trait `Clone` is not implemented for `NotShadowReceiver`
    |

I also noticed TransmittedShadowReceiver would have the same issue, so added Clone there as well.


An alternative would be to implement FromTemplate instead of Default and Clone. I'm not sure which solution is preferred in general, but these are Marker components so don't require any additional values.

@ChristopherBiscardi ChristopherBiscardi added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 5, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in ECS Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

1 participant