Answer the question
In order to leave comments, you need to log in
How to load a specific scene in unity2D?
For example, if you press the F1 button, here is my code, but it loads the following scenes, this is not very convenient. Pzh do not write something like look in Google.
using UnityEngine.SceneManagement;
void Update()
{
if (Input.GetKey(KeyCode.F1))
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question