Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Andrew Cherkashin · Mar 29, 2010 at 05:16 AM · guiplayerlabel

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...

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Andrew Cherkashin · Apr 18, 2010 at 04:56 AM 0
Share

any examples? can't figure out how to use code form first answer.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best 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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Andrew Cherkashin · Mar 29, 2010 at 06:03 AM 0
Share

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?

avatar image Eric5h5 · Mar 29, 2010 at 06:26 AM 0
Share

@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.

avatar image Andrew Cherkashin · Mar 29, 2010 at 09:28 AM 0
Share

i will try. i just cant figure out how to combine that code with , $$anonymous$$e.

avatar image
1

Answer by efge · Mar 29, 2010 at 07:54 AM

You could use a 3D Text object as a child object for your player (and make it face to the camera).

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image lampshade · Dec 18, 2010 at 09:22 AM 0
Share

And will this 3D Text be reflected (so that it points toward other (networked) players)?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges