소스 검색

[unity] Hopefully fixed Spine Preferences `textureSettingsReference` setting changing between MacOS and Win. See #1895.

Harald Csaszar 4 년 전
부모
커밋
fab2b6e4ce
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs

+ 3 - 1
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs

@@ -236,7 +236,9 @@ namespace Spine.Unity.Editor {
 					if (string.IsNullOrEmpty(textureSettingsRef.stringValue)) {
 						var pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMATexturePreset");
 						if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
-							textureSettingsRef.stringValue = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
+							var assetPath = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
+							if (!string.IsNullOrEmpty(assetPath))
+								textureSettingsRef.stringValue = assetPath;
 						}
 					}