Why when changing the font/text size of GUI.Box the Box is gone ?

using UnityEngine;
using System.Collections;

public class QuitGame : MonoBehaviour {

    bool showMenu = false;
    GUIStyle gustyle;

    // Use this for initialization
    void Start () {

        gustyle = new GUIStyle();
        gustyle.fontSize = 20;
    }
  
    // Update is called once per frame
    void Update () {

        if (Input.GetKeyDown(KeyCode.Escape)) {
            showMenu = !showMenu; // toggle between true/false
        }
    }

    void OnGUI () {
        if (showMenu == false)
        {
            return;
        }

        var w = 150;
        var h = 150;
        Rect rect = new Rect((Screen.width-w)/2, (Screen.height-h)/2, w, h);
 
        // Make a background box
        GUI.Box (rect, "Main Menu", gustyle);

        // Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
        if (GUI.Button (new Rect (rect.x + 20, rect.y + 40, 80, 20), "PLAY")) {
            //Application.LoadLevel(1);
        }

        // Make the second button.
        if (GUI.Button (new Rect (rect.x + 20, rect.y + 70, 80, 20), "EXIT")) {
            Application.Quit ();
        }
    }
}

Once i added the gustyle to the line:

GUI.Box (rect, "Main Menu", gustyle);

The box is gone. The text is bigger but without the box.
What i want to do is a box in the middle of the screen with some title text size of the box and with some menu buttons inside the box under the title like Play, Stop, Pause, Resume, Quit, Options…etc.

But i can’t make a good box size with the buttons size and texts size.

And another sub question: What is better to use for main menu ? GUI.Box,labels,buttons…or the 3D Text ? Or maybe using the Canvas system ?

This is a screenshot of the main menu without the gustyle:

And this is with the guistyle:

I don’t know the answer to your first question, but as for what’s better for a menu, I’d go for a canvas. From the pictures you showed, I’d say use a canvas + Buttons; you can set their size, font size, and colours/images. Using the UI system is preferred to OnGUI. It’s pretty easy to setup something like you showed there.

The answer to the question is that appearance of the “box” itself is defined by the GUIStyle. Since you’ve created your own GUIStyle, you would have to also include the appearance of the box in that style for it to appear.

That said, yes, absolutely 100% use the Canvas system. IMGUI (the GUI system that uses OnGUI) is the old GUI system and it was never any good at making a user-friendly or well-performing UI. The only thing for which IMGUI is still recommended is writing Editor scripts.