Loading new scene from a scene full of buttons

I am using unity 5.2.1f1. I have had success with tutorials where there is a single button on screen to change scenes but not multiple buttons. I have a “Select your level” type scene with buttons whos text read the numbers from 1 to 12.

I’ve been trying for 3 days now to have one of the buttons load a new scene but between the new unity 5 api and outdated resources that I’ve found online I can’t seem to get it.

How can I load 12 different scenes with 12 different buttons located on the same scene?

What are your scenes that you want to load called? If you have 12 scenes called “Scene 1”, “Scene 2”, “Scene 3”, … Look at the bottom at the OnClick() area where you can assign functions to be called. Create a script with this code inside:

public void StartScene(string sceneName) {
Application.LoadLevel(sceneName);
}

Now place this script on any object on your scene, such as the Camera, or an empty GameObject you won’t delete. Then, in the OnClick() area, drag the object with the script into the field, select your script from the dropdown, and find the function called “StartScene”. Select that, and you should be able to fill in a field to the right of that. You can put the name of the level there (such as Scene 2, etc).

Does this solve your problem?