By looking for error stack method, I have located the error code. In the skeleton JSON file, there has a piece of code:
"bone10": {
"rotate": [
{ "time": 0.2333, "angle": 12.18, "curve": "stepped" },
{ "time": 2, "angle": 12.18 }
],
"translate": [
{ "time": 0.2333, "x": 56.43, "y": -268.77, "curve": "stepped" },
{ "time": 2, "x": 56.43, "y": -268.77 }
],
"scale": [
{ "time": 0.2333, "x": 1.74, "y": 1.59, "curve": "stepped" },
{ "time": 2, "x": 1.74, "y": 1.59 }
],
"flipX": [
{ "time": 0.2333, "x": true }
]
},
the error is on "flipX" , spine-unity could not read the property of "flipX" in skeleton JSON file. But on spine-cocos2dx it could. I could show the debug code and the error.
else
{
UnityEngine.Debug.LogError(timelineName);
throw new Exception("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")");
}
this code is add in skeleton JSON file of line 522.
the error show is:
flipX
UnityEngine.Debug:LogError(Object)
Spine.SkeletonJson:ReadAnimation(Dictionary`2, String, SkeletonData) (at Assets/Data/spine-csharp/SkeletonJson.cs:530)
Spine.SkeletonJson:ReadSkeletonData(TextReader) (at Assets/Data/spine-csharp/SkeletonJson.cs:289)
Spine.Unity.SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/Data/spine-unity/Asset Types/SkeletonDataAsset.cs:143)
Spine.Unity.SkeletonGraphic:Initialize(Boolean) (at Assets/Data/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs:186)
Spine.Unity.SkeletonGraphic😮nValidate() (at Assets/Data/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs:81)
UnityEngine.CanvasRenderer:RequestRefresh()
So I Commented out the code
else
{
// UnityEngine.Debug.LogError(timelineName);
// throw new Exception("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")");
}
it could work. But I know the "flipX" property has not work. so I must need the spine designer cancel use "flipX" property.
05 8月 2016, 11:24
It is not the version problem, Unity could compatible spine version 2.1.27