bevy/crates/bevy_render
James Sully 88700f3595 Add mutating toggle method to Visibility component (#6268)
# Objective

Make toggling the visibility of an entity slightly more convenient.

## Solution

Add a mutating `toggle` method to the `Visibility` component

```rust
fn my_system(mut query: Query<&mut Visibility, With<SomeMarker>>) {
    let mut visibility = query.single_mut();
    // before: 
    visibility.is_visible = !visibility.is_visible;
    // after:
    visibility.toggle();
}
```

## Changelog

### Added
- Added a mutating `toggle` method to the `Visibility` component
2022-10-17 15:42:43 +00:00
..
macros Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00
src Add mutating toggle method to Visibility component (#6268) 2022-10-17 15:42:43 +00:00
Cargo.toml remove copyless (#6100) 2022-09-27 18:11:40 +00:00