Skip to content

Commit

Permalink
Document EntityMut::remove()
Browse files Browse the repository at this point in the history
  • Loading branch information
xgbwei committed Oct 4, 2022
1 parent 8a26812 commit b1087ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_ecs/src/world/entity_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ impl<'w> EntityMut<'w> {
}

// TODO: move to BundleInfo
/// Removes a [`Bundle`] of components from the entity and returns the bundle.
///
/// Returns `None` if the entity does not contain the bundle.
pub fn remove<T: Bundle>(&mut self) -> Option<T> {
let archetypes = &mut self.world.archetypes;
let storages = &mut self.world.storages;
Expand Down

0 comments on commit b1087ab

Please sign in to comment.