mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-02 13:49:07 +08:00
[unity] Fixed editor bone scale reset to 1.0 after play mode changes. Closes #1526.
This commit is contained in:
parent
732595eb01
commit
bec09c14cf
@ -94,14 +94,16 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void Initialize () {
|
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
|
#if !NEW_PREFERENCES_SETTINGS_PROVIDER
|
||||||
Preferences.Load();
|
Preferences.Load();
|
||||||
#else
|
#else
|
||||||
SpinePreferences.Load();
|
SpinePreferences.Load();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (EditorApplication.isPlayingOrWillChangePlaymode) return;
|
||||||
|
|
||||||
string[] assets = AssetDatabase.FindAssets("t:script SpineEditorUtilities");
|
string[] assets = AssetDatabase.FindAssets("t:script SpineEditorUtilities");
|
||||||
string assetPath = AssetDatabase.GUIDToAssetPath(assets[0]);
|
string assetPath = AssetDatabase.GUIDToAssetPath(assets[0]);
|
||||||
editorPath = Path.GetDirectoryName(assetPath).Replace("\\", "/");
|
editorPath = Path.GetDirectoryName(assetPath).Replace("\\", "/");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user