JetBrains Rider 2025.3 Help

Code inspection: Scene does not exist

This inspection detects when a script attempts to load a scene using a name or path that does not exist within the current Unity project. Loading a scene that is not present in the project will lead to runtime errors.

How it works

The inspection monitors calls to scene management methods, such as SceneManager.LoadScene, SceneManager.LoadSceneAsync, and EditorSceneManager.OpenScene. It extracts the first argument and checks if it matches any known scene asset in the project.

The analyzer handles different ways Unity refers to scenes:

  • Short name: "MyScene"

  • Relative path: "Scenes/MyScene"

  • Full Asset path: "Assets/Scenes/MyScene.unity"

If the scene is not found in the project's asset database at all, the inspection triggers a warning.

Example

In this example, the "MissingScene" string does not match any .unity file in the project's Assets folder.

using UnityEngine; using UnityEngine.SceneManagement; public class SceneLoader : MonoBehaviour { void Start() { // Reported: "MissingScene" does not exist in the project SceneManager.LoadScene("MissingScene"); } }
using UnityEngine; using UnityEngine.SceneManagement; public class SceneLoader : MonoBehaviour { void Start() { // "MainMenu" must exist as a .unity file in the project SceneManager.LoadScene("MainMenu"); } }
26 March 2026