So I have an invisible button in my game, when the player clicks it once I want it to go away until they get back to the menu… as far as I know, “renderer.enabled” and “SetActive” don’t work here, so what would I put in here?
private bool IsClicked = false;
if (GUI.Button(rect, "", GUIStyle.none))
{
RunFunction();
IsClicked = true;
// need something here to disable button; function can run only once
}