Hello! In the game I’m working on, we’ve got a lot of objects in each level that need to be ‘ready’ to interact with other objects in the scene. For instance, there are about 20 or so tree objects scattered throughout the first level.
I’ve been trying to improve the game’s frame rate, and have hit a roadblock with the Animator’s performance. Up until this point, most idle objects in our level that need to have animations (rocks, trees, etc) have been made with an “idle” state which has the object in its default state. Our “idle” animations have Loop Time disabled, and every animator has a culling mode of “Based on renderers”.
However, even with these precautions, Animator.Update shows >50% CPU time in the Unity profiler, on the very objects (trees, rocks) that should not be updating (loop time is turned off). Under Animator.Update are “Animator.SendTransformChanged” and “Animator.AppleGenericAnimatedProperties”, each using about 15-20% CPU time. The child processes under each don’t seem to have any noticeable impact.
Is there a better way to handle idle/static animation states? It’s going to be a pain if we have to end up disabling animators on everything and selectively enabling them at runtime. Is there something I’m missing? If these objects aren’t currently animating, then why are “ApplyGenericAnimatedProperties” and “SendTransformChanged” using so much CPU?
Thanks in advance!