Function ambient_api::prelude::ambient_element::use_entity_component
source · pub fn use_entity_component<T>(
hooks: &mut Hooks<'_>,
id: EntityId,
component: Component<T>
) -> Option<T>
Available on crate feature
guest
only.Expand description
Use a component from an entity in the ECS.
If the entity or component does not exist, this will return None
.