Skip to content
Discussion options

You must be logged in to vote

You could see the entity commands returned by commands.spawn() as an entity builder. I am on my phone, so no guarantee that it compiles, but it could look like this:

let mut entity = commands.spawn();
for component in components {
    entity.insert(component);
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@biot023
Comment options

@NiklasEi
Comment options

Answer selected by biot023
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants