public void OnDisable() { #if UNITY_EDITOR if (!Application.isPlaying) UnityEditor.EditorApplication.update -= Update; #endif }