summaryrefslogtreecommitdiff
path: root/ecs/src
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src')
-rw-r--r--ecs/src/relationship.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/ecs/src/relationship.rs b/ecs/src/relationship.rs
index 0ebd9c2..44ed93a 100644
--- a/ecs/src/relationship.rs
+++ b/ecs/src/relationship.rs
@@ -365,6 +365,12 @@ where
}
}
+ pub fn target_uids(&self) -> impl Iterator<Item = Uid> + '_
+ {
+ (0..self.target_count())
+ .map_while(|target_index| self.get_target(target_index).copied())
+ }
+
/// Returns a iterator of the components of the targets of this relationship.
#[must_use]
pub fn iter(&self) -> TargetComponentIter<'_, 'rel_comp, Kind, ComponentT>