I have created 3 scenes (StartMenu, Game, Win) and added all of them to built setting with proper arrangement. StartMenu Scene has a button start which should take game to second Game Scene when onClick event is called on it.

The onClick event of start button is mapped to LevelManager Empty Object. That object has a script LevelManager whose code I have posted.

I have added all those scenes to built settings.

but still I am getting this error:

Level 'name'(-1) couldn't be loaded because it has been added to the built settings.
To add a level to the built settings use menu File->Built settings.
LevelManager:LoadLevel(String) (at Assets/Scripts/LevelManager.cs:8) // 8 line is Application.LoadLevel line)


using UnityEngine;
using System.Collections;

public class LevelManager : MonoBehaviour {

    public void LoadLevel(string name){

    public void QuitRequest(){
            Debug.Log("Quit Requested"); 


Error Code snapshot(couldn't copy):

  • 1
    \$\begingroup\$ I suggest you copy/paste the error message instead of trying to retype it. You've changed the meaning of the message with mistakes. \$\endgroup\$
    – House
    Commented Jul 21, 2015 at 14:41
  • \$\begingroup\$ @Byte56 i couldn't copy it...so have uploaded the screenshot. Please have a look at it. \$\endgroup\$ Commented Jul 21, 2015 at 15:02
  • 1
    \$\begingroup\$ What is the exact string you are passing to LoadLevel? Debug it. \$\endgroup\$ Commented Jul 21, 2015 at 15:08
  • \$\begingroup\$ -1. You should at least try to debug your code before asking the question. \$\endgroup\$ Commented Jul 29, 2016 at 18:44

2 Answers 2


Error message tells you exactly what is wrong. You are trying to load scene with name name. You have to change the string in the editor in OnClick handler to Game in your case.

  • \$\begingroup\$ yaa you are 100% correct. But, I don't it clearly in error message. Which line that's it? \$\endgroup\$ Commented Jul 21, 2015 at 15:29
  • 2
    \$\begingroup\$ First line, second word. It's not variable name but variable value. Change text to dumb and you will notice the difference in error message. \$\endgroup\$ Commented Jul 21, 2015 at 15:37

I was having the same issue. It worked one day, and not the next. I found that for some reason, it lost the link in the picture I provided. It worked fine after I updated all of the buttons on all of the scenes.



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .