HUD (Heads Up Display) creation

How would one go about creating a HUD?

Not exactly like this but similar. Basically, The HUD will show the map (both galaxy map and star system map)(bottom left), a chat system (both private chat, race chat, global chat)(bottom right), and some player info (Shields, Health, currency, rank, etc)(Top right).

All that is possible with the GUI system. I think there is a chat example in the networking example project ( ). Search on the forum forum for tips on how to create a minimap. Player info can be added however you want, just create some labels and add the info. For the style I suggests that you take a look at GUISkins or GUIStyles (see the docs). The rest is just textures and icons.

For all those markers on the screen indicating other ships and that sort of stuff, you can take a look at Camera.WorldToScreenPoint (I think that is what the function is named anyway).

Just to mention that this sort of GUI is quite complex and will take a long time to code up.

Hope it gives you some help.

If performance is key you can best use some sort of 'sprite manager' and draw the whole GUI in one draw-call. You need to place all GUI elements on one texture for this. You can do the same for font rendering. In my current projects I use a simple sprite manager and simple font manager I made on the go but on the scripts wiki there's a sprite manager that should do the trick and is better documented (and probably better designed, mine is mainly about speed and simplicity for my specific case).

If you want it I can supply you my code but haven't got time to really give support on it and as I said earlier it's quite rough and badly documented, especially the font thing. The font thing is also more complex because you need to make fonts for it and currently I only support the font tool created by angelcode (free but you have to google it to find it). Basically it does about the same thing as TextMesh, so for text that's probably a good option to look into.

EDIT: erm, as I came to UnityAnswers from the iphone developers forum I automatically assumed that the question was about making an iphone game where draw-calls are bad bad bad, if this is for Win/Mac platform, don't bother and use normal GUI code :-)