bevy/crates/bevy_state
Brandon Reinhart 02028d16b3
impl Reflect + Clone for StateScoped (#14156)
# Objective

- Expand the flexibilty of StateScoped by adding Reflect and Clone
- This lets StateScoped be used in Clone Bundles, for example

```rust
#[derive(Component, Reflect, Clone)]
pub struct StateScoped<S: States>(pub S);
```

Notes:
- States are already Clone.
- Type registration is up to the user, but this is commonly the case
with reflected generic types.

## Testing

- Ran the examples.
2024-07-08 01:00:04 +00:00
..
macros rename the crate bevy_state_macros_official back to its original name (#13732) 2024-06-07 12:49:21 +00:00
src impl Reflect + Clone for StateScoped (#14156) 2024-07-08 01:00:04 +00:00
Cargo.toml rename the crate bevy_state_macros_official back to its original name (#13732) 2024-06-07 12:49:21 +00:00