What do I add to this script, so if you clicked the button ex. 30 times, a gui.box will appear?

var clickCounter: int;
var mySkin : GUISkin;

function OnGUI () {


    if (GUI.Button(Rect(Screen.width / 2, Screen.height / 2, 100, 30), "Wictors:  " + clickCounter)) { 


        clickCounter ++;

    }
    GUI.skin = mySkin;
    GUI.Box (Rect (10,10,240,100), "testytest");
    

}

What can I add, so if you clicked a specified number of times, something will happend. I’m just stuck with how I should get it to count them and activate when it hits a number. Any tips?
Thanks in advance

1 Answer

1

if(clickCounter >= 30)
{
//put gui box here
}