gllame

I have a question about memory usage.

For example, I made one spine asset, its data size is 10 MB(include texture, bone and animation data). Then I use it to create 100 SkeletonAnimtion instances in game.
I want to know, will it cost 1000 MB memory totally? or How much will it cost?
gllame
  • Messaggi: 3

Harald

No, multiple instances like SkeletonAnimation only load the SkeletonData once, it is then shared across all instances. See sections "Data objects" and "Instance objects" in the documentation:
Runtime Architecture - Spine Runtimes Guide: Data objects
Runtime Architecture - Spine Runtimes Guide: Instance objects

In general, please be sure to export your skeleton in binary format instead of as a .json file (as described here) when file size and loading times matter (so for your actual game build).
Avatar utente
Harald

Harri
  • Messaggi: 4196


Torna a Unity