decline-cookies / anvil-unity-dots

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

Task System - Task Driver Names #79

Open jkeon opened 2 years ago

jkeon commented 2 years ago

For a given Task System, there might be multiple TaskDrivers for the different contexts.

These will be a number like 2 or 3 or 4 which makes it hard to tell from logs or debugging what those contexts mean.

It would be nice to have a string name for the TaskDriver so that we can give it some context along with its parents.

For example, knowing that the TimerTaskDriver with context 2 is the timer to wait for an idle timeout as part of the WanderTaskDriver vs TimerTaskDriver with context 3 which is to wait 1 second before deciding what to do in the JobCompleteTaskDriver.

(examples are just made up but get the point across)

mbaker3 commented 2 years ago

Wondering if we could accomplish this by maintaining a dictionary along side the ByteIDPRovider that maps the IDs to the type names that were delivered the ID. This would be debug only (maybe?). ID to Name conversion would be easy for any logging then.