Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question How to match clip offsets from code?

Discussion in 'Animation' started by vonSchlank, Aug 13, 2021.

  1. vonSchlank

    vonSchlank

    Joined:
    Jan 5, 2017
    Posts:
    28
    When i'm in the editor, i can right click on an animation clip on the Timeline, and Match Offsets to Previous Clip. How can i do that runtime, from code?
     
  2. yale3d

    yale3d

    Joined:
    Oct 12, 2018
    Posts:
    16
    More than a half year was not enough to answer this question. How embarrassing...
     
  3. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    304
    nobody knows...
     
  4. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    304
    Actually found solution you need to make Timeline package editable, then move TimelineAnimationUtilities.cs from Editor folder outside and then you can access TimelineAnimationUtilities.MatchPrevious from runtime

    good some parts of unity are open source
     
    yale3d likes this.
  5. yale3d

    yale3d

    Joined:
    Oct 12, 2018
    Posts:
    16
    Thanks, i'll give it a try!
     
unityunity