bevy/crates/bevy_ecs/src/world
Garett Cooper fa56a5cd51 Add component_id function to World and Components (#5066)
# Objective

- Simplify the process of obtaining a `ComponentId` instance corresponding to a `Component`.
- Resolves #5060.

## Solution

- Add a `component_id::<T: Component>(&self)` function to both `World` and `Components` to retrieve the `ComponentId` associated with `T` from a immutable reference.

---

## Changelog

- Added `World::component_id::<C>()` and `Components::component_id::<C>()` to retrieve a `Component`'s corresponding `ComponentId` if it exists.
2022-06-25 20:41:54 +00:00
..
entity_ref.rs untyped APIs for components and resources (#4447) 2022-05-30 15:32:47 +00:00
identifier.rs Unique WorldId (#2827) 2021-09-30 20:54:47 +00:00
mod.rs Add component_id function to World and Components (#5066) 2022-06-25 20:41:54 +00:00
spawn_batch.rs Implement FusedIterator for eligible Iterator types (#4942) 2022-06-09 03:19:31 +00:00
world_cell.rs Fix broken WorldCell test (#5009) 2022-06-14 16:14:33 +00:00