I’m afraid making an online game is a rather complex thing, especially if you’re still getting to know unity… I’ll try getting you in the right direction though, this is the basics of what you need to do to make a simple menu that appears when the player presses the tab key:
You will have to look at GUI components in unity - Unity GUI
You can then make your texture in Photoshop (or anywhere else) and use it as the menu background.
You can use test variables such as score etc to test your menu. The scores can be displayed using GUI text.
You will have to check for Input in your code:
function Update () {
if(Input.GetButtonDown(“tab”))
{
// show menu
}
}
This should help you get started, making a simple menu can be hard - especially if you are planning on showing online player names, scores etc.
Use OnGUI to display a HUD. Detect for keypress using Input.GetKey(KeyCode.Tab). Have a flip toggle in your OnGUI that flips positive for every other tab press.
var tabTriggered:int = -1;
function OnGUI(){
// detect if tab key is pressed.
if(Input.GetKey(KeyCode.Tab))tabTriggered *= -1;
// have the GUI display only when Tab is toggled
if(tabTriggered>0){
// display GUI
}
}
For your PlayerController component, make sure Tab isn’t assigned to do anything.