So I have some inputs that are set to mouse 0 and mouse 1, but when I have a GUI open I don’t want those inputs to be recognized, because when the player clicks on a GUI button then they also, for example, turn on their flashlight simultaneously. You could see why this might be problematic. Any way to go about fixing this? Thanks for any help!
Im half-asleep but something like:
bool buttonOpen;
void Update(){
if(buttonOpen) return;
else {
float whatever = Input.GetAxis("axisname");
//Do whatever
}
}
basically use a boolean to check if your GUI is open and only handle the input in your code if it isn’t.