Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to access from Runtime Animation's Dopesheet values

Discussion in 'Animation' started by Ahab_, Nov 15, 2020.

  1. Ahab_

    Ahab_

    Joined:
    May 22, 2019
    Posts:
    62
    Hello.

    Is there any way to access the Dopesheet values of a specific animation through Runtime?

    I am talking about the info shown in the attached picture.

    dopesheet.PNG

    Would be really nice to find a way to modify it by a script instead of doing it always manually for each animation.

    Thanks!
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,588
    If you add custom curves to the animation, you can make a float parameter with the same name in your Animator Controller and Unity will automatically update it every frame with the value of that curve so you can get it from there.

    But I have no idea if that technique can be used for curves that are already controlling something.
     
  3. Ahab_

    Ahab_

    Joined:
    May 22, 2019
    Posts:
    62
    hI
    Thanks for your reply.

    What I try to achieve is to correct offset values for specific bones when I apply animations to specific characters. You know, sometimes limbs don't have the exact appropiate angle and such and is really bothering.

    Can be fixed manually but is such a waste of time.

    I made some google searches I found ideas similar to yours in old posts, but still, I couldn't came up with a straight solution.