-
Hey, sorry but is there a way to add/insert a component without using Commands? `use bevy_ecs::prelude::*; use crate::prelude::*; pub fn set_display_cells(rows: i32, columns: i32, world: &mut World) {
} ` any help would be great. regards |
Beta Was this translation helpful? Give feedback.
Answered by
james7132
Nov 25, 2022
Replies: 1 comment 3 replies
-
If you know an entity already exists, you can use world
.entity_mut(entity)
.insert(Position { x: row, y: column }); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Schr3da
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you know an entity already exists, you can use
World::entity_mut
to get anEntityMut
for that entity.