- Home /
Draw GUI in world space.
I want to "draw" the player's name near the head of the character. How can I do it? Or is it faster to use a child object? It's the same with drawing a health bar...
any examples? can't figure out how to use code form first answer.
Answer by Eric5h5 · Mar 29, 2010 at 05:28 AM
Use this script on the wiki, which uses GUIText objects. You can modify it slightly to use GUITextures for a health bar.
i forget i need a c# solution, and i have a lot of objects(and positions/names of that objects user receive from server)... may be it's better to create a child objects with label?
@Andrew Cherkashin: It would be simple to rewrite that in C# if you want. I can't see how child objects would work, considering the names won't be facing the camera (or would be backwards), and would get smaller the farther away the characters are, therefore being unreadable most of the time. You could fix that with scripting, but if you're going to do that, you might as well just use GUIText objects to begin with.
i will try. i just cant figure out how to combine that code with , $$anonymous$$e.
Your answer
Follow this Question
Related Questions
How to make a monolgue? 1 Answer
Passing a variable through the main menu 2 Answers
OnGUI called after LateUpdate screwing up debug text database 1 Answer
GUI SCREW UPS! 1 Answer
Deduct health on collision 2 Answers