E
E
edos1642022-04-14 15:27:02
Unity
edos164, 2022-04-14 15:27:02

Can you help me solve the problem with the keycode?

Good afternoon. Such a story happened, I wrote a code in order to move the arrow button to the right to another scene, but when I run the code it doesn't work. There are no errors. What to do in such a situation?

void LoadScene()
    {
        if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            SceneManager.LoadScene("Scene");
        }
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LittleBob, 2022-04-14
@edos164

Are you calling the LoadScene method anywhere?
You need to call it in Update for this to work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question