Просмотр исходного кода

[untiy] Fixed a compile error when building executable (Texture2D.alphaIsTransparency exists only in editor).

Harald Csaszar 6 лет назад
Родитель
Сommit
19bbd5519f

+ 2 - 0
spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs

@@ -580,7 +580,9 @@ namespace Spine.Unity.AttachmentTools {
 		static void CopyTextureAttributesFrom(this Texture2D destination, Texture2D source) {
 			destination.filterMode = source.filterMode;
 			destination.anisoLevel = source.anisoLevel;
+		#if UNITY_EDITOR
 			destination.alphaIsTransparency = source.alphaIsTransparency;
+		#endif
 			destination.wrapModeU = source.wrapModeU;
 			destination.wrapModeV = source.wrapModeV;
 			destination.wrapModeW = source.wrapModeW;