From 6e7abf273d758bf15c1ba3e331e370b2bea3f8e2 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 13 Sep 2025 19:24:29 +0200 Subject: feat(ecs): re-implement component added & removed events --- ecs/src/entity.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ecs/src/entity.rs') diff --git a/ecs/src/entity.rs b/ecs/src/entity.rs index bec50cd..6ee5ad8 100644 --- a/ecs/src/entity.rs +++ b/ecs/src/entity.rs @@ -173,6 +173,12 @@ impl<'a> Handle<'a> .contains_component_with_exact_id(component_uid) } + /// Returns the `Uids`s of the components this entity has. + pub fn component_ids(&self) -> impl Iterator + '_ + { + self.archetype.component_ids_sorted() + } + pub(crate) fn new( archetype: &'a Archetype, entity: &'a ArchetypeEntity, -- cgit v1.2.3-18-g5258