Entity Spawners are now job structs that allow for creating an Entity in a job and getting back the deferred Entity from the Entity Command Buffer that will create it.
What is the current behaviour?
Spawning Entities are fire and forget. You have to develop some way to pick up created Entities later on.
This is really difficult when you need to assign specific instances to "slots" or associate relationships.
What is the new behaviour?
You can acquire an EntitySpawner struct off of an EntitySpawnSystem and use that in your jobs.
EntitySpawners can create any IEntitySpawnDefinition, no need to have it typed beforehand anymore.
They will return the deferred Entity that the underlying EntityCommandBuffer creates. You can use the API on the EntitySpawner to assign relationships that will be patched later on.
What issues does this resolve?
None
What PRs does this depend on?
258
Does this introduce a breaking change?
[x] Yes - Spawning is different now although the API migration is relatively straight-forward.
Entity Spawners are now job structs that allow for creating an Entity in a job and getting back the deferred Entity from the Entity Command Buffer that will create it.
What is the current behaviour?
What is the new behaviour?
EntitySpawner
struct off of anEntitySpawnSystem
and use that in your jobs.EntitySpawner
s can create anyIEntitySpawnDefinition
, no need to have it typed beforehand anymore.Entity
that the underlyingEntityCommandBuffer
creates. You can use the API on theEntitySpawner
to assign relationships that will be patched later on.What issues does this resolve?
What PRs does this depend on?
258
Does this introduce a breaking change?