Hello, I am new to spine and I am trying to handle it. I have already read the mix and match scripts example in spine, but cant find the way to optimaization my code. This is the scenario that I am trying to solve:
I have 20 type items like Shirt, Pants, Shoes, Socks, Hair ... Each contains many items inside.
Each time user select one type i have to run 20 times method AddSkin.
For example: my character currently select item 1 in each type items, like shirt_1, pants_1, shoes_1, socks_1, hair_1 ... and i did it by create new skin named "currentSkin" and use 20 method AddSkin ,each respectively to type items to the currentSkin i have created. Now if user select shirt_2, I have to use 20 method AddSkin to add to new skin and then update to skeleton.
currentSkin.AddSkin(Hair);
currentSkin.AddSkin(Shoes);
currentSkin.AddSkin(Socks);
currentSkin.AddSkin(Pants);
.............
Can i just reuse currentSkin and then remove the shirt_1 and add shirt_2. It could be better for performance right?
Any advice or things to try out would be greatly appreciated!