Pārlūkot izejas kodu

[unity] Fix binary version check.

John 8 gadi atpakaļ
vecāks
revīzija
467853a786

+ 1 - 0
spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs

@@ -1191,6 +1191,7 @@ namespace Spine.Unity.Editor {
 				try {
 				try {
 					rawVersion = SkeletonBinary.GetVersionString(new MemoryStream(asset.bytes));
 					rawVersion = SkeletonBinary.GetVersionString(new MemoryStream(asset.bytes));
 					//Debug.Log(rawVersion);
 					//Debug.Log(rawVersion);
+					isSpineData = !(string.IsNullOrEmpty(rawVersion));
 				} catch (System.Exception e) {
 				} catch (System.Exception e) {
 					Debug.LogErrorFormat("Failed to read '{0}'. It is likely not a binary Spine SkeletonData file.\n{1}", asset.name, e);
 					Debug.LogErrorFormat("Failed to read '{0}'. It is likely not a binary Spine SkeletonData file.\n{1}", asset.name, e);
 					return false;
 					return false;