Quick answer: The Unity editor can access all assets in your project, but builds only include assets that are explicitly referenced. Scenes must be added to Build Settings, assets loaded via Resources.
Here is how to fix Unity build missing scenes resources. Everything works perfectly in the Unity editor. You hit Play, scenes load, prefabs instantiate, textures appear, and audio plays. Then you build the project and run the executable — and half your game is missing. Scenes fail to load with Scene 'LevelTwo' couldn't be loaded because it has not been added to the build settings, Resources.Load returns null, and assets that were clearly in your project are nowhere to be found. The editor and the built player have fundamentally different rules about which assets are available, and understanding this distinction is how you fix the problem.
The Symptom
After building your project (File > Build and Run, or an automated build pipeline), the resulting application exhibits one or more of these failures:
Missing scenes: SceneManager.LoadScene("LevelTwo") throws an error or loads nothing. The first scene loads fine (it is at index 0 in Build Settings), but subsequent scenes cannot be found. Your level select menu shows blank entries or the game crashes when trying to transition between scenes.
Null resources: Calls to Resources.Load<T>("path/to/asset") return null in builds but work in the editor. Prefabs that you dynamically instantiate fail to load. Audio clips, ScriptableObjects, and materials loaded at runtime are all null, causing NullReferenceException cascades throughout your code.
Missing StreamingAssets files: JSON configuration files, custom data files, or bundled content placed in the StreamingAssets folder cannot be read. File.ReadAllText() throws FileNotFoundException. On Android, the WebRequest-based approach fails because you used a direct file path instead of UnityWebRequest.
Addressables not loading: If you use the Addressables system, assets fail with InvalidKeyException or RemoteProviderException. The Addressables catalog was not built, or the build references content that was built for a different build target.
What Causes This
The root cause is always the same: the Unity editor can access any asset in your project at any time, but builds only include assets that the build pipeline explicitly knows about. There are five specific mechanisms that trip developers up:
1. Scenes not added to Build Settings. Unity only includes scenes that appear in the File > Build Settings > Scenes In Build list with their checkbox enabled. The editor can load any scene in the project via SceneManager.LoadScene(), but builds can only load scenes in this list. New scenes are not automatically added. If you created a scene, worked on it for weeks, and never added it to Build Settings, it will not exist in your build.
2. Assets not in a Resources folder. Resources.Load() only works with assets inside folders named exactly Resources (case-sensitive). You can have multiple Resources folders anywhere in your project, and they all get merged during the build. But if an asset is in Assets/Prefabs/Enemy.prefab instead of Assets/Resources/Prefabs/Enemy.prefab, Resources.Load("Prefabs/Enemy") will return null in builds even though the editor resolves it.
3. Addressables content not built. The Addressables system separates asset content building from player building. You must explicitly build your Addressable content (the asset catalogs and bundles) before building the player. If you skip this step, or if the content was built for a different platform than your current build target, the Addressables system will fail at runtime.
4. Wrong StreamingAssets path. Files in the StreamingAssets folder are copied verbatim into the build, but the path to access them differs by platform. Using a hardcoded path like "Assets/StreamingAssets/config.json" will fail. You must use Application.streamingAssetsPath. On Android, StreamingAssets is inside a compressed APK and cannot be accessed with System.IO.File — you must use UnityWebRequest.
5. Asset references lost due to string-based loading. Unity's build pipeline includes assets that are directly referenced by scenes and scripts (via serialized fields). Assets loaded purely by string at runtime (like Resources.Load("myAsset")) are only included if they are in a Resources folder. If you reference an asset only by filename string without a serialized reference or a Resources folder, the build pipeline has no way to know the asset is needed and strips it.
The Fix
Step 1: Add all required scenes to Build Settings. Open File > Build Settings and verify every scene your game loads is listed and checked. You can automate this with an editor script to catch missing scenes before building.
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneLoader : MonoBehaviour
{
// Safe scene loading with validation
public void LoadLevel(string sceneName)
{
// Check if the scene is in Build Settings before loading
int sceneIndex = SceneUtility.GetBuildIndexByScenePath(
$"Assets/Scenes/{sceneName}.unity");
if (sceneIndex < 0)
{
Debug.LogError($"Scene '{sceneName}' is not in Build Settings! " +
"Add it via File > Build Settings.");
return;
}
SceneManager.LoadScene(sceneName);
}
// Log all scenes included in the build
void Start()
{
Debug.Log($"Total scenes in build: {SceneManager.sceneCountInBuildSettings}");
for (int i = 0; i < SceneManager.sceneCountInBuildSettings; i++)
{
string path = SceneUtility.GetScenePathByBuildIndex(i);
Debug.Log($" [{i}] {path}");
}
}
}
// Editor script to auto-add all scenes in a folder to Build Settings
// Place this in an Editor folder
#if UNITY_EDITOR
using UnityEditor;
using System.Collections.Generic;
using System.IO;
public class BuildScenesValidator
{
[MenuItem("Tools/Validate Build Scenes")]
public static void ValidateBuildScenes()
{
string[] sceneGuids = AssetDatabase.FindAssets("t:Scene", new[] { "Assets/Scenes" });
List<EditorBuildSettingsScene> buildScenes = new();
foreach (string guid in sceneGuids)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
buildScenes.Add(new EditorBuildSettingsScene(path, true));
UnityEngine.Debug.Log($"Added to build: {path}");
}
EditorBuildSettings.scenes = buildScenes.ToArray();
UnityEngine.Debug.Log($"Build Settings updated with {buildScenes.Count} scenes.");
}
}
#endif
Step 2: Verify Resources folder structure and loading paths. Assets loaded with Resources.Load must be inside a folder named Resources. The load path is relative to the Resources folder and must not include the file extension.
using UnityEngine;
public class ResourceLoader : MonoBehaviour
{
void Start()
{
// Asset is at: Assets/Resources/Prefabs/Enemy.prefab
// Load path is: "Prefabs/Enemy" (no extension, relative to Resources)
// WRONG: includes "Resources/" prefix
// var bad = Resources.Load<GameObject>("Resources/Prefabs/Enemy");
// WRONG: includes file extension
// var bad = Resources.Load<GameObject>("Prefabs/Enemy.prefab");
// CORRECT
GameObject enemyPrefab = Resources.Load<GameObject>("Prefabs/Enemy");
if (enemyPrefab == null)
{
Debug.LogError("Failed to load Enemy prefab! Check that it is inside " +
"a Resources folder and the path is correct.");
return;
}
Instantiate(enemyPrefab, Vector3.zero, Quaternion.identity);
}
// Load a ScriptableObject config at runtime
public T LoadConfig<T>(string configName) where T : ScriptableObject
{
// Asset at: Assets/Resources/Config/GameSettings.asset
T config = Resources.Load<T>($"Config/{configName}");
if (config == null)
{
Debug.LogError($"Config '{configName}' not found in Resources/Config/. " +
"This will fail in builds!");
}
return config;
}
}
Be aware that the Resources folder has a significant drawback: everything inside it is included in every build, even if you never load it. For large projects, this increases build size and startup time. Unity recommends using Addressables for production projects instead of Resources.
Step 3: Build Addressables content and handle StreamingAssets correctly.
// Addressables: Build content before building the player
// Window > Asset Management > Addressables > Groups > Build > New Build > Default Build Script
// Or automate it in a build script:
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.AddressableAssets.Settings;
using UnityEditor.AddressableAssets.Build;
public class BuildAutomation
{
[MenuItem("Tools/Build Addressables and Player")]
public static void BuildAll()
{
// Step 1: Build Addressable content first
AddressableAssetSettings.CleanPlayerContent();
AddressableAssetSettings.BuildPlayerContent();
// Step 2: Then build the player
BuildPlayerOptions options = new()
{
scenes = new[] { "Assets/Scenes/Main.unity", "Assets/Scenes/Game.unity" },
locationPathName = "Build/MyGame.exe",
target = BuildTarget.StandaloneWindows64,
options = BuildOptions.None
};
BuildPipeline.BuildPlayer(options);
}
}
#endif
// StreamingAssets: Use the correct path for each platform
using System.IO;
using UnityEngine;
using UnityEngine.Networking;
using System.Collections;
public class StreamingAssetsLoader : MonoBehaviour
{
// Works on all platforms including Android
public IEnumerator LoadStreamingAsset(string fileName)
{
// CORRECT: Use Application.streamingAssetsPath
string path = Path.Combine(Application.streamingAssetsPath, fileName);
// On Android, StreamingAssets is inside the APK
// Use UnityWebRequest instead of File.ReadAllText
using var request = UnityWebRequest.Get(path);
yield return request.SendWebRequest();
if (request.result == UnityWebRequest.Result.Success)
{
string json = request.downloadHandler.text;
Debug.Log($"Loaded streaming asset: {json.Substring(0, 100)}...");
}
else
{
Debug.LogError($"Failed to load {fileName}: {request.error}");
}
}
// Desktop-only shortcut (does NOT work on Android/WebGL)
public string LoadStreamingAssetDesktop(string fileName)
{
string path = Path.Combine(Application.streamingAssetsPath, fileName);
if (!File.Exists(path))
{
Debug.LogError($"StreamingAssets file not found: {path}");
return null;
}
return File.ReadAllText(path);
}
}
A quick pre-build checklist to prevent these issues: open Build Settings and confirm all scenes are listed; search your project for Resources.Load calls and verify each asset exists in a Resources folder; build Addressables content if you use the system; test a development build before making a release build, since development builds include more detailed error messages about missing assets.
"The editor lies to you. It finds assets you never properly set up for builds. Always test a build early and test often — do not wait until release day to discover half your game is missing."
Related Issues
If your build includes all assets but sprites do not render at runtime, see SpriteRenderer Not Visible for sorting layer and material issues that can differ between editor and builds. If your async asset loading code causes the game to freeze during builds, check Async Await Freezing the Main Thread for proper non-blocking loading patterns.
Test a build early. The editor hides a dozen missing-asset bugs from you.