diff options
author | HampusM <hampus@hampusmat.com> | 2025-09-23 18:20:11 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-09-23 18:20:23 +0200 |
commit | 20c45467612ff2448b87ce731f939145c6e3a3b1 (patch) | |
tree | c3db1eb3ad2c97810873ef594ac0046e328bbf02 /ecs/src/lib.rs | |
parent | 6e7abf273d758bf15c1ba3e331e370b2bea3f8e2 (diff) |
feat(ecs): make Actions::spawn return future entity's UID
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r-- | ecs/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index 0c2197c..77d40db 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -425,9 +425,7 @@ impl World for action in action_queue_lock.drain(..) { match action { - Action::Spawn(components) => { - let new_entity_uid = Uid::new_unique(UidKind::Entity); - + Action::Spawn(new_entity_uid, components) => { if let Err(err) = self.data.component_storage.create_entity(new_entity_uid) { |