Reworking the internals of TaskDrivers and related data to work on the concept of a world unique ID instead of the type.
This approach gets us most of the way there and solves the issue of being able to have multiple DataStreams on the same TaskDriver with the same type.
This paves the way for:
245
241
246
What is the current behaviour?
Everything is keyed off of Type so you can only have one of each type.
What is the new behaviour?
Added BurstRuntimeExtension which allows for getting a hash code off a string.
Changed uint ID's to DataOwnerID and DataTargetID respectively to make them more explicit and safe to work with.
Also opens to #244
Reworked TaskDriver and PersistentData to utilize these IDs. They are World unique and thus the same in every world.
Simplified migration because we can leverage the fact that ID's are the same across worlds.
With the use of the new ID's, we can optionally include a unique context identifier string in order to have more than one of the same type of data. This works for both PersistentData and TaskDriver data.
Changed TaskDrivers to have explicit parenting as part of their constructor.
This might go back to the way it was before but right now this makes it a lot easier to avoid race conditions and ordering problems with generating ID's since we're guaranteeing that the ID's can be generated in the constructor.
NOTE:
This is a bunch of jankyness in the internals right now. I've tried cleaning it up but then it just takes me down to actually implementing #241 so I drew a line and kept it like it is today.
What issues does this resolve?
224
What PRs does this depend on?
None
Does this introduce a breaking change?
[x] Yes - TaskDriver's require a parent to be passed in. Defaults to null.
Reworking the internals of TaskDrivers and related data to work on the concept of a world unique ID instead of the type.
This approach gets us most of the way there and solves the issue of being able to have multiple
DataStreams
on the same TaskDriver with the same type.This paves the way for:
245
241
246
What is the current behaviour?
Everything is keyed off of
Type
so you can only have one of each type.What is the new behaviour?
BurstRuntimeExtension
which allows for getting a hash code off a string.uint
ID's toDataOwnerID
andDataTargetID
respectively to make them more explicit and safe to work with.TaskDriver
andPersistentData
to utilize these IDs. They areWorld
unique and thus the same in every world.PersistentData
andTaskDriver
data.TaskDrivers
to have explicit parenting as part of their constructor.NOTE:
This is a bunch of jankyness in the internals right now. I've tried cleaning it up but then it just takes me down to actually implementing #241 so I drew a line and kept it like it is today.
What issues does this resolve?
224
What PRs does this depend on?
Does this introduce a breaking change?