mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed Exception in incorrect material setting detection mechanism. Fixes #1305.
This commit is contained in:
parent
c33f768932
commit
f004e74965
@ -277,6 +277,7 @@ namespace Spine.Unity.Editor {
|
||||
string materialPath = texturePath.Substring(0, extensionPos) + "_Material.mat";
|
||||
Material material = AssetDatabase.LoadAssetAtPath<Material>(materialPath);
|
||||
if (material != null) {
|
||||
if (material.HasProperty(STRAIGHT_ALPHA_PARAM_ID)) {
|
||||
int straightAlphaValue = material.GetInt(STRAIGHT_ALPHA_PARAM_ID);
|
||||
if (straightAlphaValue == 0) {
|
||||
string materialName = System.IO.Path.GetFileName(materialPath);
|
||||
@ -284,6 +285,7 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user