rxmarcus

Our game has skeletons that can have various customizations such as headwears, coloring, etc. We have UI in the game of just the head of the character to show their in game stats / health.

headsexamples.png


Up to this point, we've been using a full SkeletonGraphic with everything hidden except the head bone to create this visual effect. The problem is that it's unnecessarily expensive to have all these Skeletons that aren't actually animating and are just a still shot of the characters head.

I'm wondering if it's possible to access the Skeleton Atlas and reconstruct the player head visuals simply with UI Image components only and no SkeletonGraphic?

Any direction or ideas to help me move forward would be greatly appreciated!
You do not have the required permissions to view the files attached to this post.
rxmarcus
  • Posts: 76

Harald

You can enable SkeletonGraphic.freeze to disable any bone/etc updates.

You could access the Attachment at the head slot, and then call attachment.GetRegion() to retrieve the AtlasRegion object which holds all information about the atlas texture region.
User avatar
Harald

Harri
  • Posts: 2075

rxmarcus

Wonderful, glad to see several options. Thank you as always Harald!
rxmarcus
  • Posts: 76

Harald

You're welcome.
User avatar
Harald

Harri
  • Posts: 2075


Return to Unity