Need help making a gui

Hello all,

I am trying to make a GUI for a project, however I have never made a GUI in unity so it is very confusing for me.

What I am trying to do is make a displayed score based on enemies remaining. I have searched the forums and found one post that has helped, as well as have looked at the FPS tutorial for their GUI stuff but that hasn’t helped me much.

http://forum.unity3d.com/viewtopic.php?t=25436&highlight=enemies+remaining

That is the forum post I found that has what I am essentially looking to make, however, I am unsure of how to start off making the GUI. Any help on this would be extremely appreciated. I need help on this as soon as possible as we are under a tight deadline to get this done and I have already wasted a lot of time.

Thanks in advance.

Hi.
First of all, here’s a nice tutorial about GUI scripting.

And some code:

var remainingEnemies: int = 15;
var guiSkin: GUISkin; 
// Assign a GUISkin from your project panel (right click -> Create -> GUISKin)

// [...] Keep track of remaining enemies etc...

function OnGUI()
{
	if (guiSkin) GUI.skin = guiSkin;
	GUI.Label(Rect(0, 0, 160, 24), "Enemies: " + remainingEnemies);
	//NOTE: Rect(x, y, width, height) in screen coordinates, origin is in the top left corner
}

You’ll probably want to import your own font and add it to your GUISkin. To do so just drag’n’drop it in the project view, adjust it’s properties (size!) and finally set the font property of your GUISkin.

thx will give that a shot