Clear presses from previous scene

In my first scene I have a button that causes the second scene to load. The second scene has a button in the same location. If the user is over eager (or the delay loading the second scene is over long) they might press the button multiple times while the scene is loading. As soon as the new scene finishes loading those button presses come through, but since it is a new (different) button the result is lousy.

Can I clear pending inputs when I load the new scene?

Is there another trick to prevent this behavior?

Thank you in advance for your help!

One option I would like to suggest is that once user presses the button to load the second scene then disable that button or remove it altogether from the screen so that user will not be able to press it multiple times. This will clear out the problem of user trying to press the load button multiple times. It is a very standard trick used in the websites to prevent form submissions multiple times by users since user might feel that the website is not responding or like that.

To add to it once user presses the load button and you hide or disable it, you can show a message to the user that second scene is being loaded to let them know that their input is received and system is processing it.

How about try adding a state of “not press” or a timer after loading scene after before load another new scene?

If I were you, I will try these solutions…

  1. There must be non-press state first of this trigger
  2. After a loading scene action, there must be 1 sec duration, then able to trigger.
  3. Use GUI Animation, everytime new scene loaded, the GUI will animate from outside of screen, make sure the user will not press the same button again.

I think you could easily fix this by just setting the button’s interactable variable to false the first time they press it.


I think I understood your question incorrectly, if the problem is in the second scene, create a script that sets the same variable to true after some seconds, this way when the scene is still loading the button would not be interactable.

Dont know why this would happen.

But the first fix that came to mind was to set a one second delay after scene load before you can press the button. Or maybe less ,1/4 of a sec, just play with it.