Search Unity

Change sample rate of multiple animation clips simultaneously

Discussion in 'Animation' started by magebuzzcutt, Aug 4, 2021.

  1. magebuzzcutt

    magebuzzcutt

    Joined:
    Jun 20, 2021
    Posts:
    17
    Hi,

    I am new to Unity so I'm sorry if the answer is obvious but is it possible to change the sample rate of multiple clips at once in the editor? Selecting multiple clips at once and setting the sample rate only changes a single clip instead of them all. I will have up to a few hundred animation clips for a single entity in my game and it would become too tedious to change them all one by one.

    I've tried looking up how to change them using a script and documentation from - https://docs.unity3d.com/ScriptReference/AnimationClip.html.
    But the two properties I want to change (frameRate and length) are read-only. So is there another way I could look into implementing something to change the sample rate of all my clips?

    Thanks in advance.
     
  2. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Rather than changing the clips themselves, why don't you change their playback speed in the animator controller?