瀏覽代碼

[unity] Fixed casting exception when use custom atlas asset. Closes #1342.

Harald Csaszar 6 年之前
父節點
當前提交
cd703b38cf
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineEditorUtilities.cs

+ 3 - 3
spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineEditorUtilities.cs

@@ -1362,9 +1362,9 @@ namespace Spine.Unity.Editor {
 
 				bool pmaVertexColors = false;
 				bool tintBlack = false;
-				foreach (SpineAtlasAsset atlasAsset in skeletonDataAsset.atlasAssets) {
+				foreach (AtlasAssetBase atlasAsset in skeletonDataAsset.atlasAssets) {
 					if (!pmaVertexColors) {
-						foreach (Material m in atlasAsset.materials) {
+						foreach (Material m in atlasAsset.Materials) {
 							if (m.shader.name.Contains(PMAShaderQuery)) {
 								pmaVertexColors = true;
 								break;
@@ -1373,7 +1373,7 @@ namespace Spine.Unity.Editor {
 					}
 
 					if (!tintBlack) {
-						foreach (Material m in atlasAsset.materials) {
+						foreach (Material m in atlasAsset.Materials) {
 							if (m.shader.name.Contains(TintBlackShaderQuery)) {
 								tintBlack = true;
 								break;