We are using Spine, and it looks great. But - when we instantiate our prefabs with spine animation attached on it, Unity freezes for several seconds, and then we see lots of work and 100+ MB garbage. Could you please tell us what's wrong - does our spines are bad, or maybe there is some settings to remove this lag?

On the screenshot - example with instatiaton of one Spine asset from resources folder in empty scene.
You do not have the required permissions to view the files attached to this post.
  • Posts: 1


Did you export the skeleton as .json or binary .skel.bytes file? Please note that .json loading at runtime will lead to much more GC load than the same skeleton exported as binary .skel.bytes file.

Also, as is typical Unity best-practice (with any game engine actually): please consider creating pools of your objects instead of instantiating and destroying them. You can then pre-warm the pools with a suitable number of objects at level-load time to not have any hiccups during actual play time, if that is possible.
User avatar

  • Posts: 2076

Return to Unity