Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How can I assign an AnimatorStateTransition field in the inspector?

Discussion in 'Animation' started by kfjwheeler, May 31, 2021.

  1. kfjwheeler

    kfjwheeler

    Joined:
    Jan 18, 2021
    Posts:
    2
    I have a field of type AnimatorStateTransition in one of my components. However, I'm not sure how to go about assigning it in the inspector. Drag/drop doesn't seems to be possible from the Animator window. Is there any way to do this?

    upload_2021-5-31_10-43-15.png
     

    Attached Files:

  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    You can't, and AnimatorStateTransition is in the UnityEditor namespace so it won't exist at runtime anyway.

    But you might be interested in Animancer (link in my signature) which lets you avoid Animator Controllers and control everything directly in scripts, so you have full runtime access to all the transition details.
     
  3. kfjwheeler

    kfjwheeler

    Joined:
    Jan 18, 2021
    Posts:
    2
    Thanks for the info, but it's a little late for that. We have a lot of work already put into animator controllers.