Search Unity

Question Automatically adjust SpeedMultiplier on AnimationClip (Opposite of "Match Content")

Discussion in 'Timeline' started by kai303, Jan 14, 2021.

  1. kai303

    kai303

    Joined:
    Jun 9, 2016
    Posts:
    21
    I have an animation clip that has a given length and is not looping. When I create an animation track in the Timeline and drag this clip there, I can adjust the size/length of the clip in the timeline. If the length in the timeline does not match the length of the clip itself it will be displayed with indicators - either with "Hold" or by an arrow on the right end of the visual element. Now, there is this very handy feature called "Match Content" that automatically adjusts the length in the timeline to the length of the animation clip. What I am looking for is a feature that does the opposite. So let's say the length of the animation clip is 1 second and it's length in the timeline is 2 seconds. Is there a function that I can use that automatically adjusting the speed multiplier of the clip (in this example to 0.5) so that it's play length will match the selected length in the timeline?
     
  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    If you press shift while trimming, it will stretch the content to fit
     

    Attached Files:

  3. kai303

    kai303

    Joined:
    Jun 9, 2016
    Posts:
    21
    That's is exactly, what I was looking for. Thank you so much!