When switching scene's the very first input is always ignored.

New to Unity.

I’m transitioning from my start menu into the game, and the first input from mouse and keyboard is always ignored.

If I load the scene directly, instead of through the start menu, there is no issue.

So that leads me to believe that something in my start menu setup is screwing up.

I have the this my Hierarchy

7098268--845794--Untitled.png

and I have the ‘MainMenu’ attached to the canvas.

7098268--845800--Untitled.png

and I’m loading the scene using this

    public void Load_Grassland()
    {
        SceneManager.LoadScene(1);
    }

It all seems fairly basic to me, but I guess I’ve missed a step somewhere.

Googled around for awhile, and couldn’t find anyone else with the issue, so posting here and hoping for the best. xD

Anyone have a clue why the first input is failing?

Only time I’ve seen a click-button break like this happen is when the game loses focus: you have to click it once to refocus it.

However, changing scenes does drop certain other continuous input states, which is incredibly annoying.

Fortunately I made a workaround for it, and you can read all about it here:

1 Like

I found a solution using your comment as a guidepost.

SceneManager.LoadScene(1, LoadSceneMode.Single);

Adding the load scene mode single, seems to completely erase the main menu from existence, instead of layering on top.

I think the issue is/was that the mouse event triggered on the down press, and something about the button was still selected, and since it was still in the background, you needed to push any key to get out of that state.

Anyway, that’s just my guess!

The above addition worked perfectly and removed the issue.

Thanks for the help!

1 Like