![]() # 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 | ||
query | ||
schedule | ||
storage | ||
system | ||
world | ||
archetype.rs | ||
bundle.rs | ||
change_detection.rs | ||
component.rs | ||
event.rs | ||
lib.rs | ||
reflect.rs |