From ca9f46d92bafb1eb4346bc1558ab2696367dd661 Mon Sep 17 00:00:00 2001 From: pharan Date: Thu, 20 Jul 2017 19:03:11 +0800 Subject: [PATCH] [csharp] Fix (IS_UNITY) symbol. --- spine-csharp/src/Atlas.cs | 8 ++++++-- spine-csharp/src/SkeletonBinary.cs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/spine-csharp/src/Atlas.cs b/spine-csharp/src/Atlas.cs index 7701c1831..04f2c5755 100644 --- a/spine-csharp/src/Atlas.cs +++ b/spine-csharp/src/Atlas.cs @@ -28,6 +28,10 @@ * POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ +#if (UNITY_5 || UNITY_5_3_OR_NEWER || UNITY_WSA || UNITY_WP8 || UNITY_WP8_1) +#define IS_UNITY +#endif + using System; using System.Collections.Generic; using System.IO; @@ -44,7 +48,7 @@ namespace Spine { List regions = new List(); TextureLoader textureLoader; - #if !(UNITY_5 || UNITY_4 || UNITY_WSA || UNITY_WP8 || UNITY_WP8_1) // !UNITY + #if !(IS_UNITY) #if WINDOWS_STOREAPP private async Task ReadFile(string path, TextureLoader textureLoader) { var folder = Windows.ApplicationModel.Package.Current.InstalledLocation; @@ -82,7 +86,7 @@ namespace Spine { } #endif // WINDOWS_STOREAPP - #endif // !(UNITY) + #endif public Atlas (TextReader reader, string dir, TextureLoader textureLoader) { Load(reader, dir, textureLoader); diff --git a/spine-csharp/src/SkeletonBinary.cs b/spine-csharp/src/SkeletonBinary.cs index cb3629c2e..bbb17efdc 100644 --- a/spine-csharp/src/SkeletonBinary.cs +++ b/spine-csharp/src/SkeletonBinary.cs @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -#if (UNITY_5 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_WSA || UNITY_WP8 || UNITY_WP8_1) +#if (UNITY_5 || UNITY_5_3_OR_NEWER || UNITY_WSA || UNITY_WP8 || UNITY_WP8_1) #define IS_UNITY #endif