Hello there,
I updated my project to use the new DrawOrder feature, and exported it as a json file to my game (I'm using latest libgdx and spine runtime).
However, when I try to load the json file, with readSkeletonData, an exception occurs:
Exception in thread "LWJGL Application" java.lang.ArrayIndexOutOfBoundsException: -1
at com.esotericsoftware.spine.SkeletonJson.readAnimation(SkeletonJson.java:323)
at com.esotericsoftware.spine.SkeletonJson.readSkeletonData(SkeletonJson.java:152)
At this line:
for (int i = slotCount - 1; i >= 0; i
---
)
if (drawOrder[i] == -1) drawOrder[i] = unchanged[
---
unchangedIndex];
The var "unchangedIndex", at some point, has the value of -1, which then throws the exception.
I attach my updated project file, hope it helps.
Thanks in advance.