Unity 3D HealthBar

02/21/2012 11:46 [D-E]Energy#1
Hey Leute,

als 1.
Ich weiß nicht genau wo das rein kommt deswegen poste ich es hier:
ich habe ein c# Script gemacht womit ist eine Lebensanzeige bekommen sollte, diese wird aber in Unity 3D 3.5 NICHT angezeigt, woran liegt das?

Script:
Code:
using UnityEngine;
using System.Collections;

public class PlayerHealth : MonoBehaviour {
	public int maxHealth=100;
	public int curHealth=100;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update (){
	
	}
	void OnGui(){
	GUI.Box(new Rect(10, 10, Screen.width / 2 / (maxHealth / curHealth),20), curHealth + "/" + maxHealth);
		
	}
}