decline-cookies / anvil-unity-dots

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

IEntitySpawnDefinitionExtension - Remove entity return #217

Closed mbaker3 closed 1 year ago

mbaker3 commented 1 year ago

Remove the temp entity from being returned when IEntitySpawnDefinitionExtension methods are called.

Returning the temp entity encourages a pattern that restricts the utility of a definition. The better approach is to have the definition add itself to the entity/component that you want to have reference to the new entity.

What is the current behaviour?

A temp entity is returned when the methods are called.

What is the new behaviour?

No entity is returned when the methods are called.

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?

Have your definitions add itself to the entity/component that you want to have reference to the new entity.