Skip to content

Instantly share code, notes, and snippets.

@aprilspeight
Created July 18, 2022 19:20
Show Gist options
  • Save aprilspeight/713d64d919ed3b8abf89b16c603fe888 to your computer and use it in GitHub Desktop.
Save aprilspeight/713d64d919ed3b8abf89b16c603fe888 to your computer and use it in GitHub Desktop.
Switch between scenes on key press.
if (Input.GetKeyDown("1"))
{
SceneManager.LoadScene("SceneOne");
}
else if (Input.GetKeyDown("2"))
{
SceneManager.LoadScene("SceneTwo");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment