So, I noticed my project was beginning to lag when I added more than one AI. Thinking the issue was my scripts, I super-optimized them to no avail. Profiling the project (both in the editor and in a standalone build) shows that logstringtoconsole is taking 30-500(!) MS and is responsible for over 80% of CPU usage. I see it in my UpdateAnimator() function (a function that sets animator floats and handles some input).
I’ve looked around and this issue has been reported before, it appears that whenever anything logs a string to the console (via the logstringtoconsole function - is that the correct word? - not through Debug.Log()) it produces lag. I even found it in the issue tracker; voting was disabled and it’s apparently never going to be looked at.
Is there a fix? Something that can be added in my code, or a box to uncheck?
EDIT: I solved it. I was trying to set a float that was being controlled by a curve, and it was throwing warnings.
