- Изменено
Heavy CPU load
Hi,
I have a lot of animations in project and they are all in 2 different Canvases. When I launch my project on a mobile device, I have big lags in loaded scenes, and in the profiler.
Can you please recommend how to optimize animations. If necessary, I will send an animation example.
Thanks in advance,
Seva
Sorry to hear you're having troubles.
You can find a list of optimization recommendations here on the spine-unity documentation page:
spine-unity Runtime Documentation: Performance
Erika also recently posted a very good list here on the forum:
Optimize spine file
Your profiler screenshot shows that clipping is taking a lot of time in your scene at runtime (in every frame, not at loading time). In general please always consider avoid using clipping polygons (if possible), and consider using Unity's masking features instead (components like Mask
, RectMask2D
, SpriteMask
). Please note that whenever profiling with deep profile
mode enabled, timings can be distorted very much, so be sure to check with deep profile
disabled as well to get more realistic time stamps.
The most important recommendation regarding loading times is to use binary (.skel.bytes
) export instead of .json
, as listed in the sources above.