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

This commit is contained in:
Harald Csaszar 2021-05-25 17:22:08 +02:00
parent f0f52da3ad
commit fab2b6e4ce

View File

@ -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;
}
}