Display UI Text on a 2D Sprite

Hello!

I’m having trouble displaying a UI Text element on an existing 2D Sprite. I have seen several similar questions but none seem to address the exact problem.

I need the text on top of the sprite image so I can display a value dynamically. The game is question is a card game, so I want the power displayed dynamically over the sprite of the card.

Is there any way I can do this, either through code or the Editor?

Thanks in advance and happy programming!

You could use a Canvas in world space mode and then set up the sprite as an UI image component with the text as a child of it.

Documentation for UI Canvases is found here:

http://docs.unity3d.com/Manual/UICanvas.html