decline-cookies / anvil-unity-dots

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

Add EntityManagerExtension.TryGetComponentData #180

Closed mbaker3 closed 1 year ago

mbaker3 commented 1 year ago

Add a convenience extension method that follows the bool Try...(out result) pattern.

What is the current behaviour?

The try pattern exists for ComponentDataFromEntity but not performing the same operation directly on the EntityManager.

What is the new behaviour?

Developers may call EntityManager.TryGetComponentData(Entity, out T data) now.

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?