After some tests, you are correct.
We are pooling our game objects, and it is still an issue.
We reduced one skeleton from 500ms to 100ms, by removing uslless skins (yay). But we need this to be better, Does spine-unity fully support the binary format?
29 Jun 2017, 11:27
it would seem not. The bone array does not get filled out so index out of range happens here:
BoneData boneData = skeletonData.bones.Items[ReadVarint(input, true)];
the problem seems to be withnReadVarint
returning 0 when loading the bones
//bone
for (int i = 0, n = ReadVarint(input, true); i < n; i++) {
String name = ReadString(input);
BoneData parent = i == 0 ? null : skeletonData.bones.Items[ReadVarint(input, true)];
BoneData data = new BoneData(i, name, parent);
data.rotation = ReadFloat(input);
data.x = ReadFloat(input) * scale;
data.y = ReadFloat(input) * scale;
data.scaleX = ReadFloat(input);
data.scaleY = ReadFloat(input);
data.shearX = ReadFloat(input);
data.shearY = ReadFloat(input);
data.length = ReadFloat(input) * scale;
data.transformMode = TransformModeValues[ReadVarint(input, true)];
if (nonessential) ReadInt(input); // Skip bone color.
skeletonData.bones.Add(data);
}
the bone array is never filled out.
29 Jun 2017, 11:38
the .skel
file does load in the skeletonviewer
29 Jun 2017, 12:20
oh, you have to append the file with .bytes
not .txt