Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

turning off Animation Transition Foldout

Discussion in '2020.2 Beta' started by laurentlavigne, Aug 27, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,147
    If you just re installed windows and want to get rid of the animation transition foldout, here is a script for you.
    Code (CSharp):
    1.  
    2. using UnityEditor;
    3. using UnityEditorInternal;
    4. using UnityEngine;
    5. static class DisableTreviewFoldoutAnimationTransitionInEditor
    6. {
    7.     [MenuItem("Edit/-Toggle Animation Transition For Foldout In Editor")]
    8.     static void ToggleTreviewFoldoutAnimationTransitionInEditor()
    9.     {
    10.         const string prefKey = "TreeViewExpansionAnimation";
    11.         bool newValue = !EditorPrefs.GetBool(prefKey, true);
    12.         EditorPrefs.SetBool(prefKey, newValue);
    13.         InternalEditorUtility.RequestScriptReload();
    14.         Debug.Log("TreeView animation is now " + (newValue ? "enabled" : "disabled"));
    15.     }
    16. }
    17.  
     
    Lars-Steenhoff and Peter77 like this.