Task System - Reduce Boiler Plate Jobs
jkeon opened this issue · comments
There are lots of times where data comes into a top level task driver like NavigateStart
that just needs to be converted into a PathfindStart
for a sub task driver.
Same kind of thing when a FollowPathComplete
happens and the NavigateTaskDriver
grabs that and just converts it to a NavigateComplete
.
We still have to write a job that does that and it's tedious. It would be nice to have something create a generic job or code-gen a way to reduce this boiler plate.
There may be a way to leverage Unity's LambdaSingleJobDescription
. I've started going down the route of using it in a class outside of a system before but not far enough to check if the code gen actually works in a different context.
Here's what looks like a fairly simple example of code gen working in Unity that may be a good starting point.
https://forum.unity.com/threads/sources-included-polymorphism-in-dots-now-with-source-generators.1264616/