From bec09c14cfec8a66c30e31526a0c8f67732896a2 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 22 Oct 2019 17:12:39 +0200 Subject: [PATCH] [unity] Fixed editor bone scale reset to 1.0 after play mode changes. Closes #1526. --- .../spine-unity/Editor/Utility/SpineEditorUtilities.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 5f7cac9e4..de571cb48 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 @@ -94,14 +94,16 @@ namespace Spine.Unity.Editor { } static void Initialize () { - if (EditorApplication.isPlayingOrWillChangePlaymode) return; - + // Note: Preferences need to be loaded when changing play mode + // to initialize handle scale correctly. #if !NEW_PREFERENCES_SETTINGS_PROVIDER Preferences.Load(); #else SpinePreferences.Load(); #endif + if (EditorApplication.isPlayingOrWillChangePlaymode) return; + string[] assets = AssetDatabase.FindAssets("t:script SpineEditorUtilities"); string assetPath = AssetDatabase.GUIDToAssetPath(assets[0]); editorPath = Path.GetDirectoryName(assetPath).Replace("\\", "/");