Browse Source

[unity] Fixed compile error of last commit fb8bc40 on Unity 2017. See #2851.

Harald Csaszar 3 months ago
parent
commit
845773671e

+ 6 - 4
spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataAsset.cs

@@ -40,7 +40,9 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+#if UNSAFE_DIRECT_ACCESS_TEXT_ASSET_DATA
 using Unity.Collections;
+#endif
 using UnityEngine;
 using CompatibilityProblemInfo = Spine.Unity.SkeletonDataCompatibility.CompatibilityProblemInfo;
 
@@ -61,7 +63,7 @@ namespace Spine.Unity {
 
 	[CreateAssetMenu(fileName = "New SkeletonDataAsset", menuName = "Spine/SkeletonData Asset")]
 	public class SkeletonDataAsset : ScriptableObject {
-		#region Inspector
+#region Inspector
 		public AtlasAssetBase[] atlasAssets = new AtlasAssetBase[0];
 
 #if SPINE_TK2D
@@ -95,12 +97,12 @@ namespace Spine.Unity {
 		void Reset () {
 			Clear();
 		}
-		#endregion
+#endregion
 
 		SkeletonData skeletonData;
 		AnimationStateData stateData;
 
-		#region Runtime Instantiation
+#region Runtime Instantiation
 		/// <summary>
 		/// Creates a runtime SkeletonDataAsset.</summary>
 		public static SkeletonDataAsset CreateRuntimeInstance (TextAsset skeletonDataFile, AtlasAssetBase atlasAsset, bool initialize, float scale = 0.01f) {
@@ -135,7 +137,7 @@ namespace Spine.Unity {
 			Clear();
 			GetSkeletonData(true);
 		}
-		#endregion
+#endregion
 
 		/// <summary>Clears the loaded SkeletonData and AnimationStateData. Use this to force a reload for the next time GetSkeletonData is called.</summary>
 		public void Clear () {