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. Dismiss Notice

How do I get all the animtionstate(animationClip) in animator?I found no api reference.

Discussion in 'Animation' started by JohnSonLi, Jul 8, 2015.

  1. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    I want to find em all,and add animationevents on them , how?
     
  2. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    Animator.runtimeAnimatorController.animationClips
     
  3. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    Are you sure animatior.runtimeAnimatorController has a member called animationClips?
    Unity 4.6 does not have it
     
  4. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    Ah. Yeah, animationClips has been added for 5.0+. Time to upgrade?
     
  5. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    No, it's not time to upgrade...any other idea?
     
  6. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    Not from me. I just recall that animationClips was a requested feature on the forums, and UT obliged in 5.0+.
     
  7. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    Oh, no......