So i made a script that instantiates a cube on Input.GetButtonUp(“Fire1”).
I also have a menu and anytime i click the button to close the menu the cube instantiates (obviously not my intention). I have no idea how to get around it. I tried checking that the menu is closed before instantiating, but it doesn’t work. Also tried counting frames after the menu closes. Tried moving the close menu function after the instantiate function so the instantiate function would be called a frame after the close menu function. nothing.
Does anyone have any ideas? The script this is in handles a lot of other things, so the code is too long to post in here. But I could try if it would make a difference.