Add a mechanism to create and populate an IEntitySpawnDefinitionExtension on an EntityCommandBuffer when the Archetype from EntitySpawnSystem is not available.
This is a temporary workaround until #192 is resolved.
What is the current behaviour?
If an IEntitySpawnDefinitionExtension needs to spawn multiple entities as part of its creation there is no simple way to leverage other IEntitySpawnDefinitionExtension instances to help with the creation.
What is the new behaviour?
IEntitySpawnDefinitionExtension can now have CreateAndPopulate<T>() called on them to create and populate an entity from the definition and return the entity created so the parent definition may store a reference to the entity.
Add a mechanism to create and populate an
IEntitySpawnDefinitionExtension
on anEntityCommandBuffer
when theArchetype
fromEntitySpawnSystem
is not available.This is a temporary workaround until #192 is resolved.
What is the current behaviour?
If an
IEntitySpawnDefinitionExtension
needs to spawn multiple entities as part of its creation there is no simple way to leverage otherIEntitySpawnDefinitionExtension
instances to help with the creation.What is the new behaviour?
IEntitySpawnDefinitionExtension
can now haveCreateAndPopulate<T>()
called on them to create and populate an entity from the definition and return the entity created so the parent definition may store a reference to the entity.What issues does this resolve?
What PRs does this depend on?
Does this introduce a breaking change?