I have been making a game where you can die, I want an on screen death counter so I added this:
// Death Counter
void OnGUI()
{
GUI.Label (Rect (0, 0, 100, 100), DeathCount);
}
But I keep getting an error message saying the name DeathCount does not exist in the current context, how to I get it to access this, in the script where DeathCount is I have this:
public static float DeathCount = 0f;
So why doesn't it pop up on screen?
(I also have the error "UnityEngine.Rect is a 'type' but used like 'variable'", I also need help on that but I thought that it might be affecting the main problem).
Sorry if this has already been answered I just couldn't find it after looking for over 1 hour.