• Unity
  • Making Spine animations appear in the UI

Related Discussions
...

Hello!

I've done a bunch of searches, but haven't managed to find much about how to use Spine on a Canvas. I found this topic: http://fr.esotericsoftware.com/forum/Spine-asset-to-Unity-s-UI-7071 but it wasn't much help.

Basically, I've managed to get my animation to appear in the scene view, but it's not showing up in the game view. (See attachment below).
I'm a bit of a novice with Unity UI (it took me long enough to even place the animation where I wanted it because of Rect Transform...), so please don't hesitate to suggest things that might seem totally obvious! The various components slapped onto it are copied from the black bar image, since that was actually showing up.

Many thanks, any help greatly appreciated :-)

Edit: I should add I'm on Unity 5.3.3 and Spine 2.1.27. Updating is, sadly, not currently an option.

11 días más tarde

Are you saying SkeletonGraphic didn't work for you?

I recommend you familiarize yourself with Unity UI and its basics if you intend to use it extensively in your game. That way, you will also understand what limitations you have when rendering Spine skeletons in UI.

Note that Unity's Canvas element by default only captures and renders UnityEngine.UI-based renderable components. MeshRenderer (which the normal SkeletonAnimation Spine component) is not one of these things. This is why you need to use SkeletonGraphic for UI things, and SkeletonAnimation for non-UI things.

You can get MeshRenderers to render with UI by setting the Canvas mode to Screen Space Camera. It wouldn't be the default way to go about screen-space UI, but it would work, albeit with some extra work setting up a camera for it.

3 meses más tarde

Hi,

We also have the same problem.
The Canvas is in "Screen Space - Camera" mode and the Skeleton Graphic is only visible in the Scene view.
The problem remains in all render modes (World Space and Overlay as well).

We used to use the SkeletonRenderer and "manually" set the sorting layer and sorting order, but when I learned about Skeleton Graphic I thought I could save that extra complexity...

We're using Spine 3.6.34 and runtime 3.6 2017-07-11.

Thanks!

Can you show your setup (Canvas settings, hierarchy and component setup)? or open a new topic?
I'm not sure if your case is related, especially since OP didn't reply to confirm their setup. They didn't seem to use SkeletonGraphic. (the screenshot shows a SkeletonRenderer in a canvas, which obviously won't work unless the canvas you have awfully specific settings.