powerboy

When I used the multi materials in a character , I found two problems :
1.The character have a lot of clips . I set the PNG max size to 1024 * 1024 in the Spine Editor , and it will output one atlas and muti pngs when it is not enough to contain all the clips . In this case , I output two pngs .
a.jpg


But when I use the Spine/Spawn command , it will create a character in the unity scene with 28 materials , I don't know why , is this a bug ? How should I do to modify the material number ?
b.jpg


2.I want to create a skeleton animation prefab with one atlas and muti PNGs . But how should I do to make the PNGs with outfit type ? For example head.png , arm.png , leg.png ... etc . When I change other arm , I will load other the type of arm.png , I needn't to load all the PNGs . Because it will make the memory very high . How to set prefab in unity editor ? And what should I do to change the prefab png with c# code ?
You do not have the required permissions to view the files attached to this post.
powerboy
  • Posts: 17

Nate

You get materials in Unity every time the texture changes, depending on the draw order. Use subfolders to control which images are packed onto which atlas to minimize texture changes.

Maybe a Unity guy can field the other question.
User avatar
Nate

Nate
  • Posts: 11935

Pharan

Wow. This was a long time ago. I actually have no idea what that second one means.
But I think it's a texture packing/organizing thing (how to put which parts in which page, I guess?).

Just stringing threads together: Lots of materials in inspector
In the link: More explanation of why this is happening, and what do to.

tl;dr
It's not a bug. This is what's supposed to happen.
It's harmful to performance depending on the situation. But sometimes it's fine.
There are things the user can do to fix/improve their setup and reduce the effect.
User avatar
Pharan
  • Posts: 5366

Nate

Info about group images on the same atlas page:
http://esotericsoftware.com/spine-texture-packer#Folder-structure
User avatar
Nate

Nate
  • Posts: 11935


Return to Runtimes