{"record":{"id":"efebe336eb75ade6","repo":"bevyengine/bevy","slug":"cannot-use-scene-assets-without-caching-please-ad","errorCode":null,"errorMessage":"Cannot use scene assets without caching, please add the ':' prefix.","messagePattern":"Cannot use scene assets without caching, please add the ':' prefix\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/bevy_scene/macros/src/bsn/parse.rs","lineNumber":227,"sourceCode":"                            BsnEntry::TemplateValue(path.into_token_stream())\n                        }\n                    }\n                }\n            }\n        })\n    }\n}\nimpl Parse for BsnSceneList {\n    fn parse(input: ParseStream) -> Result<Self> {\n        let content;\n        bracketed!(content in input);\n        Ok(BsnSceneList(content.parse::<BsnSceneListItems>()?))\n    }\n}\n\nimpl Parse for BsnSceneListItems {\n    fn parse(input: ParseStream) -> Result<Self> {\n        let mut scenes = Vec::new();\n        let mut commas = Vec::new();\n        loop {\n            if input.is_empty() {\n                break;\n            }\n            let value = input.parse::<BsnSceneListItem>()?;\n            scenes.push(value);\n            if input.is_empty() {\n                break;\n            }\n\n            // Try parsing without a comma or -- separator first. This makes autocomplete\n            // work in more places\n            if !(input.peek(Comma) || input.peek(TwoMinus)) {\n                let value = input.parse::<BsnSceneListItem>()?;\n                scenes.push(value);\n            }\n","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/bevyengine/bevy/blob/a62cce8c05ceacd3bd102e678c83e2b42e5dfbe2/crates/bevy_scene/macros/src/bsn/parse.rs#L209-L245","documentation":"BsnScene::parse requires the inverse too: when the entry is a string literal (the scene-asset form, BsnScene::Asset), a ':' cache prefix MUST be present. A bare \"scene.glb#Scene0\" without ':' produces this compile-time error, because scene assets are only usable through the cached form.","triggerScenarios":"Writing bsn!(\"model.glb#Scene1\") or an entry list containing an unprefixed string-literal scene path.","commonSituations":"Muscle memory from other Bevy macros where asset paths are bare strings; upgrading projects to the BSN syntax where the ':' prefix is mandatory; forgetting the prefix when adding a scene asset entry.","solutions":["Add the ':' prefix in front of the string literal: :\"model.glb#Scene1\"","Keep the entry as the FIRST entry of the list, since cached entries may not come after other entries"],"exampleFix":"// before\nbsn!(\"model.glb#Scene1\", MyComponent);\n\n// after\nbsn!(:\"model.glb#Scene1\", MyComponent);","handlingStrategy":"validation","validationCode":"// Rule to enforce before writing BSN: every string-literal scene path\n// must be preceded by ':' (and placed first in its entry list).","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write scene assets as :\"path#SceneId\", never as bare strings","Place the cached asset entry first in the list to also satisfy the first-entry rule"],"tags":["bevy","bsn","proc-macro","scene-asset","compile-error"],"backgroundTag":"proc-macro-syntax-error","analyzedSha":"a62cce8c05ceacd3bd102e678c83e2b42e5dfbe2","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}