从分析器屏幕截图中,您似乎有 3 个处于活动状态的骨架,它们在“SkeletonGraphic.Update()”中总共花费了 13.54 毫秒(28.9% 的时间)。 请注意,您似乎启用了“深度分析”,这将使数学运算的分析开销如此之大,以至于在这种情况下无法信任。 您能否禁用“深度分析”并检查使用相同骨架所花费的时间是否仍约为 14 毫秒?
如果是这样,那么请查看 spin-unity 文档页面的以下部分,了解如何避免或减少昂贵的计算:
spine-unity 运行时文档: 性能问题
From the profiler screenshot it seems you have 3 skeletons active which spend 13.54ms (28.9% of the time) in total in SkeletonGraphic.Update()
. Please note that you seem to have Deep Profiling
enabled, which will make the profiling overhead so significant on math operations that it can't be trusted in this scenario. Could you please disable Deep Profiling
and check if the time spent with the same skeletons is still approximately 14ms?
If so, then please take a look at the following section of the spine-unity documentation page on what you can do to avoid or reduce costly computations:
spine-unity 运行时文档: 性能问题