Hide Pop up Menu(panel) in void Start until toggle in activated?

Hello, i’m having a small problem on trying to hide the pop up menu panel, that i have now figured out how to toggle active after the menu button is pressed. I don’t want the pop up menu to be visible when the game starts but only when the menu button is pressed.

public class PopUpMenu : MonoBehaviour {

void Start ( GameObject panel)
{
// im having trouble here//
GameObject panel.SetActive = null;
}

public void PopUp (GameObject panel)
{
panel.SetActive (!panel.activeSelf);
}

}

Thank You,

Use this code -

public class PopUpMenu : MonoBehaviour 
{
	public GameObject panel;

	void Start () 
	{ 
		panel.SetActive( false); 
	}
		
	public void PopUp (GameObject panel) 
	{ 
		panel.SetActive (!panel.activeSelf); 
	}
}

Drag and drop MainMenu panel in the panel variable exposed in Inspector.

Start() method is automatically called by Unity at Game start.

For any query regarding code syntax in Unity use its documentation. Here you can see how to use SetActive method.