{"record":{"id":"24d9b701798de315","repo":"EllanJiang/GameFramework","slug":"can-not-load-scene-asset-0-which-is-a-binary-asset","errorCode":null,"errorMessage":"Can not load scene asset '{0}' which is a binary asset.","messagePattern":"Can not load scene asset '(.+?)' which is a binary asset\\.","errorType":"exception","errorClass":"GameFrameworkException","httpStatus":null,"severity":"error","filePath":"GameFramework/Resource/ResourceManager.ResourceLoader.cs","lineNumber":398,"sourceCode":"                    if (loadSceneCallbacks.LoadSceneFailureCallback != null)\n                    {\n                        loadSceneCallbacks.LoadSceneFailureCallback(sceneAssetName, resourceInfo != null && !resourceInfo.Ready ? LoadResourceStatus.NotReady : LoadResourceStatus.NotExist, errorMessage, userData);\n                        return;\n                    }\n\n                    throw new GameFrameworkException(errorMessage);\n                }\n\n                if (resourceInfo.IsLoadFromBinary)\n                {\n                    string errorMessage = Utility.Text.Format(\"Can not load scene asset '{0}' which is a binary asset.\", sceneAssetName);\n                    if (loadSceneCallbacks.LoadSceneFailureCallback != null)\n                    {\n                        loadSceneCallbacks.LoadSceneFailureCallback(sceneAssetName, LoadResourceStatus.TypeError, errorMessage, userData);\n                        return;\n                    }\n\n                    throw new GameFrameworkException(errorMessage);\n                }\n\n                LoadSceneTask mainTask = LoadSceneTask.Create(sceneAssetName, priority, resourceInfo, dependencyAssetNames, loadSceneCallbacks, userData);\n                foreach (string dependencyAssetName in dependencyAssetNames)\n                {\n                    if (!LoadDependencyAsset(dependencyAssetName, priority, mainTask, userData))\n                    {\n                        string errorMessage = Utility.Text.Format(\"Can not load dependency asset '{0}' when load scene '{1}'.\", dependencyAssetName, sceneAssetName);\n                        if (loadSceneCallbacks.LoadSceneFailureCallback != null)\n                        {\n                            loadSceneCallbacks.LoadSceneFailureCallback(sceneAssetName, LoadResourceStatus.DependencyError, errorMessage, userData);\n                            return;\n                        }\n\n                        throw new GameFrameworkException(errorMessage);\n                    }\n                }\n","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/Resource/ResourceManager.ResourceLoader.cs#L380-L416","documentation":"Thrown by ResourceLoader.LoadScene when the resolved resource for the scene asset is flagged IsLoadFromBinary. Scene assets cannot be loaded from binary (packed raw) resources because scene loading requires the normal resource pipeline; the scene must be packaged as a loadable asset resource instead.","triggerScenarios":"Calling LoadScene on a scene whose resourceInfo.IsLoadFromBinary is true while LoadSceneFailureCallback is null.","commonSituations":"Misconfigured resource build rules that packed a scene as a binary resource, or passing a wrong name that resolves to a binary resource.","solutions":["Fix the build configuration so scenes are packaged as scene assets, not binary.","Ensure the scene name maps to the correct resource entry.","Provide a failure callback to handle LoadResourceStatus.TypeError gracefully."],"exampleFix":"// before\nresourceComponent.LoadScene(sceneName, priority, null);\n// after\nresourceComponent.LoadScene(sceneName, priority, new LoadSceneCallbacks(onLoaded,\n    (n, s, m, u) => Log.Error($\"Scene type error: {n} {m}\")));","handlingStrategy":"validation","validationCode":"// Scenes must not be binary; verify via catalog before load\nif (IsBinaryResource(sceneName)) { Log.Error(\"Scene packed as binary: \" + sceneName); return; }","typeGuard":null,"tryCatchPattern":"try { resourceComponent.LoadScene(sceneName, priority, callbacksWithTypeError); }\ncatch (GameFrameworkException ex) { Log.Error(ex.Message); }","preventionTips":["Ensure scenes are packaged as scenes, not binary","Pass failure callbacks for TypeError status","Validate scene names resolve to scene resources"],"tags":["gameframework","resource-management","scene-loading","binary-resource","type-mismatch"],"backgroundTag":"incompatible-source-type","analyzedSha":"d0c010b05167c58e92350449d04864a91ca13fd2","analyzedAt":"2026-09-15T13:37:15.352Z","contentChangedAt":"2026-09-15T13:37:15.352Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}