Please note that performance reported in the Editor profiler might not reflect the actual performance in the build (e.g. due to lots of math operations in updating the skeleton which yield different performance in the Editor and in the final build). So always be sure to also measure the actual performance in the build.
Anyway, your Profiler output states 2.61 and 1.47 ms for all skeleton Update
and LateUpdate
calls, so these 4ms in total do not look problematic to me yet. If you are encountering framerate issues, then it's definitely not because of the 4ms update time, but because of the number of drawcalls or the number of primitives being rendered. 1000 - 5000 objects sounds like the real problem. Why do you need so many? Is there a reason why you can't combine some of them? If they are static, it does not make too much sense to render them via disabled separate SkeletonAnimation
GameObjects.
Do you have any other stats available apart from the profiler window screenshot? The normal Stats
view of the Game
window would already show valuable information.
The screenshot of your game looks very nice BTW, great artwork and mood! 8)
we set the "update when invisible" to "Nothing" and click "Use singel submesh" and "Immuatble triangles".
..
I can deactive part of scene when they are out of camera, but I don't think it's a good idea.
If you have already set the Update when Invisible
mode to Nothing
, you are already saving what would be updated in the Update
and LateUpdate
calls. If you really have that many objects though, it might be helpful to indeed disable whole GameObjects, as the overhead at such a high number of objects could already be significant.