Coming soon - Get a detailed view of why an account is flagged as spam!
view details
4
(x-post /r/Unity3D) Is there an alternative to GUI.Box for drawing a box with text?
Post Flair (click to view more posts with a particular flair)
Post Body

I am working on a game, and how we did the healthbars for each player in the world was a simple GUI.Box as follows:

 GUI.Box(new Rect(targetPos.x -30, Screen.height - targetPos.y - 46, 60, 20), curHealth   "/"   maxHealth);

The problem is we are using a vision system that utilizes camera tricks and a 3rd party lighting engine to hide enemies out of vision. This works perfectly, but because it hides based on layer and because GUI.Box draws to the GUILayer, the health bars are not being hidden along with the players. I essentially need to draw the healthbars on the hidden layer, so that they can be hidden when not within the vision cone.

I was wondering if anyone knows of any 3rd party library that behaves the same as GUI.Box for drawing a simple box?

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
47,706
Link Karma
3,451
Comment Karma
44,141
Profile updated: 6 days ago
Posts updated: 10 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
8 years ago