Search Unity

Sort animation dropdown list

Discussion in 'Animation' started by v2-Ton-Studios, Jul 18, 2017.

  1. v2-Ton-Studios

    v2-Ton-Studios

    Joined:
    Jul 18, 2012
    Posts:
    238
    Is there a way to sort the animation dropdown list?



    It currently seems to be done using "date added" with the oldest at the top, but I'd really like it to be alphabetic.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Sounds like a feature request. ;)

    Are you still doing 2D character animations?
    I wanted to inquire about the animations you were having issues with - Animation panel causing slowdowns when the animations were quite long, as I recall.
     
  3. v2-Ton-Studios

    v2-Ton-Studios

    Joined:
    Jul 18, 2012
    Posts:
    238
    Definitely a feature request :)... I was hoping there was a way to "hack" around it by editing the animation window's save state or using reflection to force a sorting of this guy through an editor add on.

    Yes, still doing 2d character animation, in unity, using a 2d rig approach. Example of work here...


    "I wanted to inquire about the animations you were having issues with - Animation panel causing slowdowns when the animations were quite long, as I recall."

    Seems like something for a different thread :), PM me here or message me on Twitter.

    Cheers.
     
    Mecanim-Dev and theANMATOR2b like this.
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    No bother if it is solved now. I think it seemed to be a version issue back in the middle 5x versions.

    Glad you are still on track - and by the way - can't wait to play that AWESOME looking game!! :eek:

    Gotchya on twitter - will follow.
     
  5. nickfourtimes

    nickfourtimes

    Joined:
    Oct 13, 2010
    Posts:
    219
    Bit of a bump here... formerly (before 5.6/2017), I could use an editor script to reorder the list of animations in an Animation component (not Mecanim Animator). Then, in the drop-down list in the animation window (shown out-of-order in the original post), the list of animations would reflect the order in the component. Thus, I could order them alphabetically in the component list, and see them alphabetically in the drop-down.

    However, currently on 2017 (2017.1.0f3), I can reorder the component alphabetically, but the drop-down seems completely arbitrary. This does indeed make the drop-down difficult to navigate when we have GameObjects with many animation clips attached (200+ in some cases).

    Is that a known regression, a will-not-fix, or otherwise?
     
  6. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    v2-Ton-Studios likes this.
  7. v2-Ton-Studios

    v2-Ton-Studios

    Joined:
    Jul 18, 2012
    Posts:
    238
    Most excellent! Thanks a ton!
     
  8. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    what if I cant upgrade to 2017, any way I can do this via script in 5.6 please ?
     
  9. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    for those of you stuck with this before 2017, you can still re-order the list via script... in an editor script like this...
    Select the gameobject with the animator in Hierarchy, then run your editor script... startign off with something like this..

    Code (CSharp):
    1.         var selected = Selection.GetFiltered<GameObject>(SelectionMode.Editable).First();
    2.         var animator = selected.GetComponent<Animator>();
    3.         var controller = AssetDatabase.LoadAssetAtPath<AnimatorController>(AssetDatabase.GetAssetPath(animator.runtimeAnimatorController));
    Once you have the controller you can dig down into the Statemachine hierarchy until you find arrays with motions, then sort by motion name.
     
  10. iprogrammer

    iprogrammer

    Joined:
    Jan 4, 2015
    Posts:
    13
    Still nothing?
     
  11. playemgames

    playemgames

    Joined:
    Apr 30, 2009
    Posts:
    438
    Would be even better to have a search filter at least to select an animation clip on an animator with hundreds of clips, I hate the dropdown so much these days because of that. Been wanting this for years now.
     
    Strance likes this.
  12. unity_TEkEHKcvu5sRAw

    unity_TEkEHKcvu5sRAw

    Joined:
    Sep 11, 2023
    Posts:
    10
    just found this, think it is weird there is still no possibility to search something in here. would be very helpful.
    note how i cannot see the top or the end xD

    upload_2024-3-3_14-39-59.png