D
D
Denisca Gareev2020-02-02 12:48:41
Unity
Denisca Gareev, 2020-02-02 12:48:41

Why is the mouse cursor blocked when using FPCController in Unity?

I have a problem.
There are two scenes in Unity.
One is the menu. The second is the level.
The first one has a Start button.
The second one has an FPSController object (with a First Person Controller script) and a script:

void Update()
    {
        if(Input.GetKey(KeyCode.Escape)){
        	SceneManager.LoadScene("Menu");
        };
    }

I start the game, press "start" and the scene is loaded - the level.
I want to go back to the menu, I press Esc, I exit, but when I click on "start" again, the mouse disappears and locks, I press Esc, it unlocks and appears, but the scene with the level does not load.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question