Based on my knowledge, when using Spine skeletons as UI elements in Unity, you need to use the SkeletonGraphic component instead of the regular SkeletonAnimation component.
Here's what you need to do:
- Create a UI Canvas if you don't have one already
- Add an Image or empty GameObject as a child of the Canvas
- Add the SkeletonGraphic component to that GameObject (not SkeletonAnimation)
- Assign your Skeleton Data Asset and Atlas Asset to the SkeletonGraphic component
Key differences:
- SkeletonAnimation is for world-space rendering (regular game objects)
- SkeletonGraphic is specifically designed for Unity's UI system (Canvas)
The SkeletonGraphic component integrates properly with Unity's Canvas rendering system and will respect the UI layering, scaling, and other Canvas settings.
If you're still having issues after switching to SkeletonGraphic, make sure:
- Your Canvas is set to an appropriate render mode (Screen Space - Overlay is easiest for testing)
- The SkeletonGraphic GameObject is properly positioned within the Canvas bounds
- Your atlas uses the correct texture settings for UI (typically uncompressed or with appropriate compression)
Let me know if switching to SkeletonGraphic resolves your issue!