Optimization for many NPCs on a scene - how to reduce OnAnimatorUpdate?

jacagugle

New member
Hi everyone
I have a game with many enemies on a scene, like around ~50. I use UCC and Behavior Tree for that. There is no group behavior, every NPC behaves "on his own". Unfrotunately, so many enemies cause a huge performance drop. And I think that this happens because OnAnimatorUpdate is called frequently on each NPC.

Is there any way to make OnAnimatorUpdate calls less frequently?
 
Have your tried using animator overrides? You can have an animator act as a "base" and extend it with others. It should provide some performance increase (untested, logically thinking).
 
The animator struggles with a lot of animations at the same time. If you change the animation update mode to normal that should reduce the load some, but there is still only so much that you can do with the animator. Disabling IK, and reducing the number of animations/transitions also helps.
 
Top