• Runtimes
  • [Unity] Unitys new GUI

Would it be possible to use a spine animation together with the new GUI in Unity?

Related Discussions
...
  • Đã chỉnh sửa
13 ngày sau

The new GUI, you mean the 2D stuff ?
If that is the case, Unity's 2D features are not as powerful as what Spine can do and therefore we can't use the features from there. I'm sure Mitch who is doing the Unity runtime can come up with a far better explanation for it if he sees this thread.

  • Đã chỉnh sửa

It's possible with a few limitations. Unity 4.6 with the new UI system just released a few days ago.
Note: Spine-Unity uses a GameObject with a MeshRenderer to render Spine skeletons.

Few things that seem to be true:
1) You can relative-position GameObjects with MeshRenderers under UI Canvases by parenting your GameObject to another Rect Transform, or by changing your Spine GameObject's regular transform itself into a Rect Transform.
2) The Screen Space - Overlay Canvas Render Mode doesn't seem to render meshes. But you still have the option of using Screen Space - Camera and World Space

I haven't tried it myself but it looks like it'll be usable.
Someone should look into how draw order/sorting order is determined between regular UI elements and MeshRenderers in this case.

I have just tried changing the Spine GameObjects transform into a RectTransform, but that just made unity crash. But i'll try your other suggestion and experiment a little more tomorrow.

Thanks!


Yes! Using Screen Space - Camera instead of Screen Space - Overlay did the trick!

Thank you so much!

3 tháng sau

Hi There, I've just tried setting the Screen Space - Camera on Canvas, and setting a rect transform on the spine character parenting it to the canvas

It looks fine in the Scene view render, however it doesn't render at all in the simulation view (running the game). Has anyone done this succesfully recently? Perhaps something has changed with Unity5?

I think Screen Space Camera needs a Camera. Sometimes, it's not immediately obvious.
You also need to set the layers so it doesn't get culled by your UI camera.

Ah cool that sorted it, thanks