decline-cookies / anvil-unity-dots

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

World Unique Task Driver #230

Closed mbaker3 closed 1 year ago

mbaker3 commented 1 year ago

Add the attribute [WorldUniqueTaskDriver] which may be applied to task driver instances that only support a single instance per world.

Tag Alongs

What is the current behaviour?

There are no uniqueness constraints on task drivers.

What is the new behaviour?

If the [WorldUniqueTaskDriver] attribute is present, AbstractTaskDriverSystem will throw an exception when the second instance is registered.

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?

If you're relying on ENABLE_UNITY_COLLECTIONS_CHECKS for the affected task driver safety make sure ANVIL_DEBUG_SAFETY is enabled.