Unity DOTS—ECS, Jobs, and Burst—integrated with NavMesh components. That's right, multi-threaded navigation.
Created on January 25, 2020. Last updated on February 25, 2020.
Today, in my Unity demo repo on GitHub, I released my DOTS navigation code for both your convenience and mine. Why? Well, I needed a navigation solution that:
It's missing things, like tests (lol) and
agent-to-agent avoidance (actually, there is agent-to-agent avoidance as of this commit!). Worse, all the parenting can cause a performance bottleneck if there are too many agents, but that will get worked out eventually was fixed. And if you were wondering, don't get uncontrollably angry, but I've been sitting on this for a while, and finally decided to let it into the wild. I just couldn't hide it any longer, despite lingering bugs and corner cases that need attention. After all, you'll submit some PRs instead of complain about stuff I made for free, right?
Of course you will...
Be aware, the Unity folks are hard at work on an official DOTS navigation solution that will undoubtedly eclipse my unofficial one, hopefully sometime this year. At that point, I will immediately update or replace my navigation code, leaning on whatever they have in store for us. That said, in the meantime, we have my MacGyver'd code emotionally abusing the
UnityEngine.Experimental.AI API to do things it was never intended for. Seriously, use my code at your own risk. I know I'm using it at my own risk.
And this is not a tutorial, by the way. It's more of an announcement. "Look what I can do!" Too much will change with the code and demo scenes for me to justify maintaining parity with a monolithic tutorial or series. Keeping that in mind, all that went into getting this to even work will probably inspire some bite-sized tutorials.
So go check it out!