Related Discussions
...

Hi there,

I have a character with 10 skins. Obviously not all 10 would be showing at the same time.
If I show only 1 of the skins, would the megabytes in memory include the other 10 as well, also would it include all the bones, vertex placement etc of the other skins or only the single skin I would like rendered?

I'm worried because I need to export in 4096 x 4096 instead of the average 2048 x 2048 I usually export since this asset is huge. The file is 20mb, would the entire 20mb run when only 1 of the skins is showing? And the characters are rendered as blurry unless I set default to 4096 in the png texture settings.

I hope my question isn't so confusing and you get what I mean.

Thank you for any help.

If I show only 1 of the skins, would the megabytes in memory include the other 10 as well, also would it include all the bones, vertex placement etc of the other skins or only the single skin I would like rendered?

Regarding textures, unfortunately by default all skin textures will be loaded, as Unity in general loads any resources that are referenced in the active scenes.

Regarding vertices and bones: bone and vertex locations are just computed when active, so nothing unused will be updated.

I'm worried because I need to export in 4096 x 4096 instead of the average 2048 x 2048 I usually export since this asset is huge. The file is 20mb, would the entire 20mb run when only 1 of the skins is showing?

Do you mean that your 4096 x 4096 atlas texture contains all 10 skins? If yes, then Unity will always load the whole 4k texture and use it as a whole, regardless of how much of it you actually need. Unity or any game engine will in general load entire textures, not parts of it.

However, the spine-unity runtime offers functionality to repack skins or attachments at runtime to a smaller atlas texture. You may want to check out the Spine Examples/Other Examples/Mix and Match and Mix and Match Equip example scenes on how to do this.

Thank you Harald. The ability to repack to smaller atlas textures is a cool idea but all my animations are on the UI so spine only allows them to work if they are on one PNG, will this idea ie. in the mix and match example also work for my case? Thanks!

maasha wrote

but all my animations are on the UI

That is no problem.

maasha wrote

so spine only allows them to work if they are on one PNG

Where do you have this information from? This is not true. You can repack from multiple source atlas textures.

2 months later

You can repack from multiple pngs for SkeletonGraphics now?

maasha wrote

You can repack from multiple pngs for SkeletonGraphics now?

It has always been possible to repack from multiple source atlas textures to a single target texture, the used Skeleton component does not matter.

In the meantime it is even possible to use multiple result atlas textures at SkeletonGraphic. See the spine-unity documentation about the Advanced - Multiple CanvasRenderers parameter.