How do I connect my main menu screen scene to go to another scene?

Sorry I’m a little new to Unity and stuff so I still am trying to figure things out.

I currently have a menu screen for this fighting game I’m making, I’m trying to make it so that if you click the button that says 1v1, it’ll take you to a scene where you can choose your own character. How exactly do i do this?
If it helps, im using the 2018 long term support version of unity.

Thanks :slight_smile:

Make a script that will handle the button event onClick:

using UnityEngine.SceneManagement;

public void LoadAScene(string sceneName) {
  SceneManager.LoadScene(sceneName);
}

Then you can set up the button in hierarchy by adding an OnClick method that will call this function. And as @Silentones mentioned, make sure to add your scenes in File > build settings.

For more information on Scene Loading:

I think you also need to add the scenes in the build settings

You also need to be on the Scene that you want to add “” Add Open Scene""

File >> Build Settings >> Add Open scenes

and then write up the scenes that you want to load in after an event.

EX:

    public void Death()
    {
        dead = true;
    
        Destroy(gameObject, .5f); 
        Player.enabled = false; 
        SceneManager.LoadScene("MainMenu"); 
    }