Search Unity

Animation.Sample cost increasing over time = losing FPS

Discussion in 'Animation' started by ItsAmee, Sep 17, 2017.

  1. ItsAmee


    Nov 22, 2012
    Profiling the game Capture1.PNG Capture.PNG see the Animation.Sample go from 8% to over 30% of the CPU usage in about 30 seconds. It continues to climb passed Camera.Render within a minute and just keeps going. This equates to the framerate dropping from over 40fps to < 20fps in a couple of minutes on the debug build.

    I don't think it's a scripting issue as the same script doesn't affect performance of non-animating assets.

    Attached are profile grabs of CPU and Rendering - any suggestions?


    Unity 5.6.1p4

    x12 characters with 10 bones each and 5 animations.

    Compute skinning on.

    Quality Settings - 1 bone.

    Vsynch Count - every v blank.

    Animation culling type - Based on Renders.

    Imports settings: Optimise mesh, high compression. Rig is Legacy, store in root. Animations set to keyframe reduction & compression.