# 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. |
||
|---|---|---|
| .. | ||
| entity_ref.rs | ||
| identifier.rs | ||
| mod.rs | ||
| spawn_batch.rs | ||
| world_cell.rs | ||