How to make a GUI Appear when a GameObject is clicked

What would the code be for making an plane clickable and on tha click it will open a GUI that i have created?!

void OnMouseDown ()
{
if (gameObject.tag == “Insert Tag”) {
_OpenGUI = true;
}
}

void OnGUI ()
	{
		if (_OpenGUI){
			//GUI Code;
            }
    }

Hi,

this is one way to your question.

Your GameObject need a collider with Trigger set as true.

bool        displayGUI = false;
void	OnGUI()
{
	if (Input.GetMouseButtonUp(0))
	{
		Ray	    	ray = Camera.main.ViewportPointToRay(Camera.main.ScreenToViewportPoint(Input.mousePosition));
		RaycastHit	outinfo;

		if (Physics.Raycast(ray, out outinfo, Mathf.Infinity))
		{
			//TOUCH! Show GUI
			displayGUI = true;
		}
	}
    if (displayGUI == true)
    {
            //GUILayout.YourStuff();
    }
}