• Unity
  • What did you DooOoooOooo?

Related Discussions
...

Hey,

I updated the Unity runtime in our project from:
3.8 09/01/2020
to
3.8 05/05/2020

Our performance was pretty slow using Spine before - We'd have maybe a drop to 50 fps in editor, with a few Spine objects in the scene. It'd be worse if they were bigger ones.

Right before I updated it, I was averaging 50 fps.

I then updated. I'm now averaging 150 fps. The game runs like 3 times better. It's consistent too. Tried a few times.

I've had a look through the history here:
https://github.com/EsotericSoftware/spine-runtimes/commits/3.8/spine-unity

I can't see anything specific about optimisations... I'd really like to understand what you did to make it work so much better?!?

Thanks!
Oliver

Harald will likely be along with some insights shortly, but I gotta say I was sweating until the part of your post that said the performance improved rather than declined! :cooldoge:

Nate escribió

but I gotta say I was sweating until the part of your post that said the performance improved rather than declined!

Same here! :grinteeth:

Are you using SkeletonMecanim? There we fixed an admittedly stupid issue where the first clip was applied twice in some mix settings: [unity] SkeletonMecanim unnecessarily applies clip twice · #1648
Thanks goes to user RichardTrailmix who found this issue.
Nevertheless, this does not explain the 3x improvement to me yet, it would explain a 2x speedup.

There was also an improvement regarding ToAtlasRegionPMAClone() methods, but I guess that is not relevant in your scenario.

We also changed some angle calculations which were previously performed using some lookup tables in the spine-unity runtime to direct sine/cosine calculations (which were intended as performance improvements back then):
https://github.com/EsotericSoftware/spine-runtimes/commit/e62c42c0412faf4b7ce9b55ae8d26aeeabfa43ce
Still, this change did not have any measurable effect on my PC, so I assume it also does not improve things dramatically on your end. Put differently, I'm happy that it did not get measurably worse 😉.

These were the commits I found which would have an affect on performance. Apart from that, some Unity Editor scripting code has also been modified along the way, you might also see improvements from some cleanup that happened there.

TL;DR: SkeletonMecanim performance should be much better now (2x would be expected), if you are not usingSkeletonMecanim`, I cannot explain the 3x improvement, but I'm happy about it! :nerd:

18 días más tarde

Sorry, only just checked back - We're using the normal SkeletonAnimation rather than Mechanim hmmmm!

Weird!