For background, I’m using the Input System (already switched in Event System, don’t worry) and I’ve created a small UI system. For whatever reason, I noticed that, after I closed the window once, it would keep closing immediately once I reopened it. To isolate the issue, I split functions and added Debug statements.
This could be my fault, but I’ve never had this issue occur before.
This is the button in question, which calls this function:
public void OnDiscardButton() {
Debug.Log("Close pickup menu (GUI Button)");
_gui.SetActive(false);
}
As mentioned, if I reopen the window later, it will close again immediately.
However, if I click somewhere else in the game window, it reopens with no issue, which is why I figured this was an issue with the Input System, in that it continually registers a click in the same place. The same issue is happening with all the other buttons on the panel.