JetBrains Rider 2025.3 Help

Code inspection: Short scene name is not unique

This inspection detects cases where a scene is loaded by a short name (e.g., "MyScene") that refers to multiple scenes present in the Build Settings.

When multiple scenes have the same filename, Unity's SceneManager.LoadScene behavior might be unpredictable or load a different scene than intended if only the short name is used.

How it works

The inspection monitors calls to SceneManager.LoadScene and SceneManager.LoadSceneAsync. It analyzes the string literal passed as the scene name argument and checks it against the scenes added to the Build Settings (the list of .unity files in the Scenes In Build section of Unity's Build Settings window).

If the provided string (e.g., "Level1") matches more than one entry in the Build Settings (e.g., Assets/Scenes/Level1.unity and Assets/Tests/Level1.unity), the inspection flags the string argument with a warning, suggesting that a more specific path should be used to avoid confusion.

Example

In this example, assume the project has two scenes: Assets/Maps/Forest/Level.unity and Assets/Maps/Desert/Level.unity, and both are added to the Build Settings. Using just "Level" is ambiguous.

using UnityEngine.SceneManagement; public class Loader : MonoBehaviour { void Start() { // Reported: Ambiguous scene name. // Both "Forest/Level" and "Desert/Level" match "Level". SceneManager.LoadScene("Level"); } }
using UnityEngine.SceneManagement; public class Loader : MonoBehaviour { void Start() { // Safe: Specifying a path (relative to Assets or just enough to be unique) SceneManager.LoadScene("Forest/Level"); } }

Quick-fix

The quick-fix suggests a list of all full paths matching the ambiguous short name, allowing you to automatically replace the short name with the correct unambiguous path.

26 March 2026