decline-cookies / anvil-unity-dots

Unity DOTS and ECS specific additions and extensions to Anvil
MIT License
4 stars 1 forks source link

EntitySpawner - Add SpawnImmediate for collections #248

Closed mbaker3 closed 1 year ago

mbaker3 commented 1 year ago

Add SpawnImmediate for collections of definitions.

What is the current behaviour?

There are SpawnDeferred overloads for collections of definitions but only individual entities may be spawned immediately.

What is the new behaviour?

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?

mbaker3 commented 1 year ago

Yea, I was just following the lead of the single entity SpawnImmediate overload.

Taking a second look at the methods available on EntityManager I made a slight adjustment to one of the SpawnImmediate overloads to leverage bulk instantiation.