If updating skeletons at 30 fps is feasible, update half of them every other 60 fps frame. This will cut your update time by half.
Is the time taken in Skeleton updateWorldTransform
or AnimationState apply
?
For updateWorldTransform, do you need to update all the bones? If you have some bones that exist only for certain effects, you could special case those bones to skip updating them when they aren't needed. Also, some spine-unity features make cause multiple updateWorldTransform calls per frame. You could try to avoid these features.
For apply, you could try to reduce the number of timelines (rows in the dopesheet) for your animations. If you have timelines with just a few keys, removing the timelines entirely reduces the amount of processing that needs to be done.
Other ways to reduce time applying animations can be to reduce the number of Bezier curve keys. For an extreme measurement of how much you can save, change all keys to linear and see how performance changes.
You could check if a linear search to find the current key is faster for you (note this has nothing to do with linear vs Bezier keys), relevant code is here:
spine-runtimes/Animation.cs at 3.6
Here is a linear search implementation (in Java):
spine-runtimes/Animation.java at 3.6
What timeline type is taking the most time?
How many animations are you applying at the same time? Note even when using a single track, if using a mix duration between animations, 2 will be applied at the same time for the mix duration.