- Home /
This post has been wikified, any user with enough reputation can edit it.
Making my currentHealt float to appear on the screen above my healthbar material and texture.
Hello! I'm trying to get my currentHealth (wich is a float) ontop of this mat and texture in this code:
function OnGUI ()
{
if(Event.current.type.Equals(EventType.Repaint))
{
var box : Rect = new Rect (5.00, HealthBarPlacementY,HealthBarWidth, HealthBarHeight);
Graphics.DrawTexture(box, hptexture, mat);
}
}
But I'm totally stuck! Whatever I do I can't seem to get my 'currentHealth' float value on my screen there!
Is there anyone who can help me in the correct way here? Thanks alot for taking your time to read and hopefully, answer my question!
Comment