The best overload for the method 'UnityEngine.GameObject.SetActive(boolean)' is not compatible with the argument list '()'.

Two errors:

The best overload for the method ‘UnityEngine.GameObject.SetActive(boolean)’ is not compatible with the argument list ‘()’.

Expression ‘self.gameObject.Find(‘Image’).SetActive()’ cannot be assigned to.

My script:

function Update ()
{
	if (yess)
	{
		gameObject.Find ("Image").SetActive() = false;
	}
}

yess is set to true in an OnGUI function. What is the problem here? I’ve used .active but it doesn’t seem to work? Do you know anything?

Use this function:

  function Update (){
        if (yess){
          gameObject.Find ("Image").SetActive(false);
        }
    }