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?
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.
I think you could easily fix this by just setting the button’s interactable variable to false the first time they press it.
.edit
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.
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.