diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs index c264e276b..e3cb1c036 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs @@ -111,6 +111,9 @@ namespace Spine.Unity.Editor { internal static SpinePreferences GetOrCreateSettings () { var settings = AssetDatabase.LoadAssetAtPath(SPINE_SETTINGS_ASSET_PATH); + + if (settings == null) + settings = FindSpinePreferences(); if (settings == null) { settings = ScriptableObject.CreateInstance(); @@ -126,6 +129,18 @@ namespace Spine.Unity.Editor { return settings; } + static SpinePreferences FindSpinePreferences () { + string typeSearchString = " t:SpinePreferences"; + string[] guids = AssetDatabase.FindAssets(typeSearchString); + foreach (string guid in guids) { + string path = AssetDatabase.GUIDToAssetPath(guid); + var preferences = AssetDatabase.LoadAssetAtPath(path); + if (preferences != null) + return preferences; + } + return null; + } + public static void HandlePreferencesGUI (SerializedObject settings) { float prevLabelWidth = EditorGUIUtility.labelWidth;