ReSharper 2025.3 Help

Code inspection: Scene is disabled in the build settings

This inspection detects when a script attempts to load a scene that exists in the Unity project and is added to the Build Settings, but is currently disabled (unchecked).

Loading a disabled scene at runtime results in a failure because Unity only includes enabled scenes in the final build.

How it works

The inspection monitors calls to scene management methods, such as SceneManager.LoadScene, SceneManager.LoadSceneAsync, and EditorSceneManager.OpenScene.

It analyzes the scene name or path argument, ensuring it is a string literal. It then checks this against the list of scenes in the Build Settings. If the scene is found in the list but its checkbox is unchecked (disabled), the inspection issues a warning.

Example

In this example, assume "Level2" is in the Build Settings but is currently disabled.

using UnityEngine.SceneManagement; public class SceneLoader : MonoBehaviour { void Start() { // Reported: Scene 'Level2' is disabled in build settings. SceneManager.LoadScene("Level2"); } }
using UnityEngine.SceneManagement; public class SceneLoader : MonoBehaviour { void Start() { // "MainMenu" is enabled in Build Settings. SceneManager.LoadScene("MainMenu"); } }

Quick-fix

This inspection provides a quick-fix that allows you to enable the scene directly from the code editor. It locates the EditorBuildSettings.asset file and modifies the entry matching the scene path to set its status to enabled.

26 March 2026