decline-cookies / anvil-unity-dots

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

Task Driver - Migrate from Entity Keyed Tasks to RequestIDs #274

Open mbaker3 opened 1 year ago

mbaker3 commented 1 year ago

Using Entities to key tasks becomes limiting when we start using Tasks Drivers in more advanced ways. Particularly if we setup circular or recursive uses of the same task driver instance.

In other words, it lets us create complex hierarchies where a task request can make its way through the same Task Driver multiple times.

Right now cancel is preventing a proper sequential unwind when the same Task Driver instance is visited multiple times in the hierarchy. All task instances that are keyed on the same entity will be cancelled at once.

What do we need?

When does this come up?

Example: ContextFiltered -> QuestTD -> Navigate ->(new requestID) ContextFiltered -> QuestTD -> Navigate -> ...