- 수정됨
SkeletonAnimation.Update() performance
I'm attempting to port my game to the Nintendo Switch and while profiling on the actual hardware, I'm seeing frequently that SkeletonAnimation.Update()
is taking over 2ms. I only have 2 Spine characters in the scene, so this feels like something isn't quite right.
I'm running Unity 2019.3.5f1 with Spine runtime package: 3.8-2020-03-11
Is this expected performance? Any ideas what I can check to improve this?
Update, here is more data via Deep Profiling with 4 skeletons active in the scene.... costing almost 16 ms...
Just an update, it appears that the large portion of the CPU time being taken up is due to the skeletons having a Skeleton Utility on them. 6 skeletons with Skeleton Utilities was taking about 4 ms per frame, the same skeletons without skeleton utilities only 0.6 ms per frame.
Not sure anything can be done about that, so I'll probably be investigating ways to use our spine characters without Skeleton Utility. We had them setup using it just for aiming a gun / weapon bone.
Unfortunately the deep profile
setting causes a lot of overhead which is biasing the actual times, especially with Spine's update logic. Could you please profile again using normal profiling mode and check whether you get similar timing?
rxmarcus wroteWe had them setup using it just for aiming a gun / weapon bone.
Please note that you should only use as few SkeletonUtilityBone
nodes as possible, so please never use the whole generated SkeletonUtilityBone
tree when you only need a part of it.
Sorry for the delay in response. Here is more profiler data running on the actual hardware not in Deep Profile mode.
Please note as well that this is with changes to my setup so that I'm no longer using Skeleton Utility which has made a big difference. This is with 6 player skeletons active. You'll see it has an average of about 1.3ms