I’m trying to create a bool function that allows me to press a button called “Use” then once I pressed it I press another button called “Remove” which hides the panel the Use button was clicked on. I anyone could help me out and show me what to type, Id really appreciate it.
{
private int counter = 0;
public bool Return;
public GameObject[] Use;
public GameObject[] Panels;
public void Add()
{
Panels[counter--].SetActive(true);
}
public void Remove()
{
Panels[counter++].SetActive(false);
if (Return == true)
{
Use[counter++].SetActive(false);
}
}
}