From e95e130e9bce6104dabb37c9e02139e8b696af64 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 7 Jan 2021 20:52:14 +0100 Subject: [PATCH] [unity] Changed implementation of previous bugfix commit ab91a35 of Editor error messages upon startup. Uses less code and executes a bit earlier. See #1779. --- .../spine-unity/Editor/Utility/SpineEditorUtilities.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs index dccc65417..5c8016b0d 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs @@ -69,7 +69,6 @@ namespace Spine.Unity.Editor { public static string editorPath = ""; public static string editorGUIPath = ""; public static bool initialized; - private static int numFramesToDelayInit = 1; private static List texturesWithoutMetaFile = new List(); // Auto-import entry point for textures @@ -97,16 +96,11 @@ namespace Spine.Unity.Editor { } #region Initialization - static SpineEditorUtilities () { - EditorApplication.update += Initialize; // delayed so that AssetDatabase is ready. + EditorApplication.delayCall += Initialize; // delayed so that AssetDatabase is ready. } static void Initialize () { - if (numFramesToDelayInit-- > 0) - return; - EditorApplication.update -= Initialize; - // Note: Preferences need to be loaded when changing play mode // to initialize handle scale correctly. #if !NEW_PREFERENCES_SETTINGS_PROVIDER