Unity 5 and the Profiler of Doom
It's been a while since the last update, and this is firmly Unity 5's fault. Before, I was using Unity 4 and had no Profiler, no dynamic lighting, and an only an idea on what stage I'd need to get this project to, to justify signing up to the Pro subscription.
Then Unity released 5 and gave away all of their cool toys for free... I decided to run the profiler for fun. If you look in the last video you'll notice some slowdown when the AI approaches the Agent. Turns out this was a fairly hefty bottleneck.
So I started working on a way to resolve this. 6 weeks of train journeys later and the results can start to be seen above. This shows two profiling graphs. The first one is from before the updates and the second from after.
You can see from the blue bars in the top section that before the average AI calculations were taking 16 ms or so, and when the AI and Agent approach each other, it was taking over 66 ms (over twice as long as a frame) to calculate possible hiding locations. In the newer graph, the average AI calculation times dropped to about 5 - 7 ms, and the hiding calculation times averaging about 14 ms.