option for turning off editor animation

In another beta thread one of the dev gave us an editor script to toggle off editor tree animation and since I installed a new machine and lost that script, it’s a good moment to remind you guys to officially add a turn off animation in the option window.

By the time windows search finishes, I had the time to find Mads’ script. Here it is for those who need a stop gap.

    using UnityEditor;
    using UnityEditorInternal;
    using UnityEngine;
   
    static class TreeViewUtils
    {
        [MenuItem("TreeViewUtility/Toggle Animation")]
        static void ToggleAnimation()
        {
            const string prefKey = "TreeViewExpansionAnimation";
            bool newValue = !EditorPrefs.GetBool(prefKey, true);
            EditorPrefs.SetBool(prefKey, newValue);
            InternalEditorUtility.RequestScriptReload();
            Debug.Log("TreeView animation is now " + (newValue ? "enabled" : "disabled"));
        }
    }
1 Like