Tainted \\ Coders

Bevy Worlds

Last updated:

Stores and exposes operations on Component, Entity and Resource.

To mutate different parts of the world simultaneously, we should use World::resource_scope or crate::system::SystemState

We can query the ComponentId of a resource:

let component_id = world
            .components()
            .get_resource_id(std::any::TypeId::of::<TestResource>())
            .unwrap();