I am having trouble to do something with the new UI.
I would like to set the player's name over his head (it's a 2D game), but I don't know how do set the text position.
However, I know how to get the player's Y position. I just don't know how to set the text to, for example, X = 0 and Y = player Y position + 50, for example.
If someone knows, please share it with me! :-)
OBS: I'm using C#
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
3 People are following this question.
How can I Update HealthUI when the object is destroyed.
Which type of Variable do I need to use to change the Value of a text UI object ?
How do I change scene with two ui canvas text
[Solved] UI Text not updating C#
What's your equivalent of old GUIStyle ?