Please tell me why this design does not work. I want her to just activate the object or deactivate it.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BuildMenu : MonoBehaviour
{
public GameObject ButtonSave;
public GameObject ButtonDel;
public void SetActiveButton()
{
if (ButtonSave == false)
{
ButtonSave.SetActive(true);
ButtonDel.SetActive(true);
}
else
{
ButtonSave.SetActive(false);
ButtonDel.SetActive(false);
}
}