GUI button oreventsystem

Excuse me I want ask something about GUI button. I have this code at my gameobject where I render the texture to live cam, at the plane I render the output. But I give some image at output like a marker to take a photo like if that point in ur head or body. Then I have a GUI button, when I click it I want that marker not active or dissapear. How I can check OnClick int that GUI button in 1 script with this, not make 2 scripts where 1 scripts to render the cam, and 2 script to OnMouseDown or OnClick. Combine it to 1 script, render live cam then check the click. Can anyone help me with this ??

    void Start ()
    {
        Debug.Log ("Script has been started");
        marker = GameObject.Find ("marker");
        plane = GameObject.Find ("Layar");
        mCamera = new WebCamTexture (Screen.width, Screen.height, 60);
        plane.GetComponent<Renderer>().material.mainTexture = mCamera;
        mCamera.Play ();
    }

    void Update () {
    }

    void OnGUI() //I want to check if this GUI click but it doesn't work
    {
        if (makerON == true) {
            marker.SetActive(false);
            //GameObject.Find ("body maker").SetActive (false);
            makerON = false;
        } else {
            marker.SetActive(true);
            //GameObject.Find("body maker").SetActive (true);
            makerON = true;
        }
    }

I don’t quiet understand your question. Your english looks a little bit as if you are German. If this is true, you may ask in German as well (but try to give an english translation anyway), cause I also speak German.

However… from your comment in the code I assume you are not sure what the OnGUI() method is for. It is for the old UI system of unity. Are you using the old (code only) or the new one (editor support)?

if you use the old one, make a button with it:

            if(GUI.Button(new Rect(10, 10, 200, 50), "maker on / off"))
            {
                makerON = !makerOn; // true becomes false / false becomes true
                marker.SetActive(makerON);
            }

EDIT: I would recommend to use the new UI system!

No not german, I speak english, sorry if my word hard to understand hahaha. Beside that, I try both old and new, I just searching some advice which better. About your code that’s for make a new GUI.Button right ?? How if I allready have UI>Button, so I want to check if that button is click or not, something like that