Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# 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
- Loading branch information