How to set a Text on a GameObject?
Hey guys, I tried to get an answer by using google but couldnt find any successful solution for my problem. I habe a cube in a room and I want to display on this cube the temperature of the room (sth like a head indicator). My problem is ,that I cant set a text to the cube, I tried 1000 ways but yeah.... I even tried to do it with TextMesh and using a "3D Text Shader" but it looks like crap....
Does sb know how to display text on an Cube? I dont want to have the text on the camera/screen.
Answer by M-Hanssen · May 12, 2016 at 12:14 PM
Create a World space canvas and place it on your cube.
If it works, please mark this answer as accepted ;-)
I did this with a 2D sprite I have, added a canvas+Text as a child but whenever I move the sprite around the text stays at the original position. Is it possible to attach it to the sprite without coding the movement?
So it seems that the gameobject.text component does nothing but let you type in text? And I cant even load a pic.png here?
Your answer
Follow this Question
Related Questions
Display rigidbody speed to a world space canvas text 2 Answers
TextUI text changes size if resolution changes 1 Answer
Displaying GUIText on top of Unity UI Image? 0 Answers
How can I update UI Text score using PlayerPrefs.Getint() on startup? 1 Answer
Unity CanvasGroup's alpha is set to 0 when Instantiate 0 Answers