Function ambient_element::use_entity_component
source · pub fn use_entity_component<T: SupportedValue + Clone + Debug + Sync + Send + PartialEq + 'static>(
hooks: &mut Hooks<'_>,
id: EntityId,
component: Component<T>
) -> Option<T>
Expand description
Use a component from an entity in the ECS.
If the entity or component does not exist, this will return None
.