the left hand side of the assignment must be Variable?

I am trying to make the quticonfirmpanel to active but somehow it said the left hand side of the assignment must be Variable.Doesn’t Gameobject count as variable?plz give me some example solution.

public class ButtonController : MonoBehaviour {
public GameObject QuitPanel;
public bool QuitConfirm;

// Use this for initialization
void Start () {
	QuitConfirm = false;

// Update is called once per frame
void Update () {


public void OnQuitButtonCLick(){
	if (QuitConfirm = false) {
		QuitPanel.SetActive = true;
	} else {
		QuitPanel.SetActive = false;


There are errors on 3 lines here
This is an assignment (you are trying to set the value of QuitConfirm to false).

if (QuitConfirm = false)

If you want to compare these values like you usually do in an if-conditional, you must use 2 equality signs

if (QuitConfirm == false) 
//or shorter
if (!QuitConfirm) 

GameObject.SetActive() is a method. You can’t assign anything to it like this QuitPanel.SetActive = true;. Instead you call a method with parameters like this QuitPanel.SetActive(true);. If you google ‘Unity SetActive’, you get hundreds of examples.