decline-cookies / anvil-unity-dots

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

AbstractTaskDriver - Assert invalid attributes #287

Closed mbaker3 closed 11 months ago

mbaker3 commented 11 months ago

TaskDrivers only support a subset of Unity's system ordering/placement attributes. We now log errors if the the common ones that aren't supported are defined on a task driver.

I did explore the feasibility of supporting update after/before and it isn't realistic to support while still supporting the ability for other systems to configure their update relative to the task driver. The only solution I could come up with was to implement our own sort and use it instead of the one build into ComponentSystemGroup

What is the current behaviour?

There is no warning when a developer uses [UpdateAfter] or[UpdateBefore] on their task driver. This can lead them to incorrectly believe that they have ordered their task driver against another system.

This is particularly confusing because ordering against a Task Driver System (Ex: UpdateAfter(TaskDriverSystem<MyTaskDriver>) is supported as well as placing [UpdateInGroup] on a task driver.

What is the new behaviour?

If a developer defines [UpdateAfter] or[UpdateBefore] on their task driver and runs with DEBUG enabled an error message will be emitted.

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?