Skip to content

Commit

Permalink
Update crates/bevy_ecs/src/world/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: James Liu <contact@jamessliu.com>
  • Loading branch information
2ne1ugly and james7132 committed Jan 17, 2023
1 parent dcd937c commit 3171089
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/bevy_ecs/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,11 @@ impl World {

/// Clears all resources in this [`World`].
///
/// Any resource fetch to this [World] will fail unless they are re-initialized.
/// **Note:** Any resource fetch to this [World] will fail unless they are re-initialized,
/// including engine-internal resources that are only initialized on app/world construction.
///
/// This can easily cause systems expecting certain resources to immediately start panicking.
/// Use with caution.
pub fn clear_resources(&mut self) {
let resource_archetype = self.archetypes.resource_mut();
for column in resource_archetype.unique_components.values_mut() {
Expand Down

0 comments on commit 3171089

Please sign in to comment.