Hi,
I am creating a UI -> When you click a button, the image (skin) swaps to a random one and uses a specific animation.
For that, I have created a button where inside there is a SkeletonGraphic script. However, I thought by changing the Initial Skin Name by code, (which has at the moment 3 skins) it would swap the skin. But, it doesn't. Is there a way to do it?
Thanks.
Page 1 of 1
Japtor
7 months ago
- Japtor
- Posts: 7
Pharan
InitialSkinName means the skin it starts with.
If you want to change the skin, use
As with other types, you may also need to make the calls in this sequence.
If you want to change the skin, use
skeletonGraphic.Skeleton.SetSkin(skinName);
As with other types, you may also need to make the calls in this sequence.
skeletonGraphic.Skeleton.SetSkin(skinName);
skeletonGraphic.Skeleton.SetSlotsToSetupPose();
skeletonGraphic.LateUpdate();
skeletonGraphic.Skeleton.SetSlotsToSetupPose();
skeletonGraphic.LateUpdate();
Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
7 months ago
-
Pharan - Posts: 5366
Japtor
Hi,
That works perfectly, Thanks!!!!
That works perfectly, Thanks!!!!

7 months ago
- Japtor
- Posts: 7
Mark topic unread
• Page 1 of 1
Return to Unity
- All times are UTC