Scene couldn't be loaded because it has not been added to the build settings
Scene 'X' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.
SceneManager.LoadScene can only load scenes that are in the build's scene list, even in the Editor's Play Mode. The scene exists in your project but is not in that list, or the name you passed does not match it.
Read the Console line first
X is the name or path you asked for. Compare it, character for character, with the scene list.
Common causes
The scene is not in the scene list
In Unity 6, open File > Build Profiles and add the scene to the Scene List. In earlier versions the list is in File > Build Settings, under Scenes In Build. Make sure its checkbox is ticked.
The name does not match
Load by the scene's file name without the path or .unity extension, and match its case.
The scene comes from an AssetBundle or Addressables
Scenes delivered that way must be loaded through the bundle or Addressables API, after the bundle is loaded.
The fix
using UnityEngine.SceneManagement;
SceneManager.LoadScene("Level2"); // file name, no path or extension
SceneManager.LoadScene(2); // or the index from the scene listStop it coming back
Keep scene names in one place, such as constants or a ScriptableObject, so a rename is a one-line change.
Questions
- Where is the scene list in Unity 6?
- Unity 6 replaced the Build Settings window with File > Build Profiles. Open it and use Scene List to add open scenes or drag scenes in. The list is shared by your build profiles unless a profile overrides it.
- Should I load scenes by name or by index?
- Names survive reordering the list; indices break silently when you move scenes around. Keep scene names in one place, such as constants or a small ScriptableObject, so a rename means one change.
- Two scenes have the same name. Which one loads?
- The first match in the scene list. Pass the full path, such as
Assets/Scenes/Levels/Forest.unity, to choose a specific one, or rename one of them.
Scripts that avoid it
Related errors
Got a different error? Paste it into the error lookup.