Hey,
We recently discovered a noticeable performance load when we added a ground cracked tile made in spine to our project.
There can be up to 100 of these tiles on screen at the same time.
I started fiddling with the animations and ended up fixing a couple of things that improved performance.
- The skeleton uses a cutout mask, so I disabled the mask at the start of the animations in which it is no used.
- The skeleton has a couple 1 frame animations that are played in loop. These 2 animations are used for 99% of the time that the tile is on screen. I figured maybe 1 frame animations looping are not so performant because some management must be done when starting/ending a loop, so that would make this steps needed every frame. I just added a dummy key to make these 1 frame animations into 20 frame animations instead.
Number 1 improved performance pretty noticeably. Number 2 was almost not noticeble.
I'd like to know if what I did makes sense and is something I should replicate for the rest of my skeletons and if there is an obvious improvement I'm missing for 1 frame animations. Maybe using FixedTimestepUpdates?
We are already using the UpdateWhenVisible property and it also seems to help.
Thanks for your time.