So I’ve got my scenes to work from pressing an actual button on the screen with the mouse, but I want the player to be able to click buttons on a keyboard or controller to mvoe onto the next scene.
So far this is on my canvas and works with my button itself, but when I add in the (Input.GetButtonDown(“Jump”)), the jump button doesn’t do anything
public string nextScene;
public void next(){
//if(Input.GetButtonDown("Jump") {
//Adding in this line above doesn't change to the next scene
SceneManager.LoadScene(nextScene);
}
}
IEnumeratorChangeLevel(){
//fade between scenes
floatfadeTime=GameObject.Find("Fade").GetComponent<Fading>().BeginFade(1);
yieldreturnnewWaitForSeconds(fadeTime);
Application.LoadLevel(Application.loadedLevel+1);