Hello dear all,
I'm wondering if my case would be possible to be achieved.
I wanna reduce draw calls count by repacking the multiple materials into one.
I know the GetRepackedSkin method does that,
and I already read the code samples in MixAndMatch examples.
But the problem is that I see a difference
between the spine stuff used in the official examples and mines using in my project.
The spine boy in the MixAndMatch (MAM) examples
has his own template skin and attachment inside his SkeletonDataAsset,
and uses GetRemappedClone method for his new attachment using the template attachment.
On the other hand,
my SkeletonDataAsset does NOT have internal attachment or skin information under the target slot.
I'm using ToRegionAttachmentPMAClone method
to generate new attachments dynamically, (without template attachment to use)
and directly assigning the generated attachment into the attachment property under the slot.
And this is where I'm getting 45 materials and the count of draw calls rises.
So far, I only see the MAM examples show the way for optimization of draw calls,
and wanna know if it still is possible to repack the skins or materials under my situation.
I'm trying to do the repacking step same as in the MAM example after changing equipment.
Is this possible? And if so, I'll appreciate any clue of the job
I'm deleting the code for some case