{"record":{"id":"78402de96857ad48","repo":"bevyengine/bevy","slug":"requested-to-load-an-asset-path-0-with-a-sub","errorCode":null,"errorMessage":"Requested to load an asset path ({0:?}) with a subasset, but this is unsupported. See issue #18291","messagePattern":"Requested to load an asset path \\((.+?)\\) with a subasset, but this is unsupported\\. See issue #18291","errorType":"exception","errorClass":"LoadDirectError","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/loader.rs","lineNumber":351,"sourceCode":"            .insert(index, *self)\n            .expect(\"the AssetIndex is still valid\");\n    }\n\n    fn asset_type_name(&self) -> &'static str {\n        core::any::type_name::<A>()\n    }\n}\n\n/// An error that occurs when attempting an async load using [`NestedLoadBuilder`].\n#[derive(Error, Debug)]\npub enum LoadDirectError {\n    /// The asset path was empty.\n    #[error(\"Attempted to load an asset with an empty path \\\"{0}\\\"\")]\n    EmptyPath(AssetPath<'static>),\n    /// Loading an asset path with a subasset at the end is unsupported. See issue [#18291].\n    ///\n    /// [#18291]: https://github.com/bevyengine/bevy/issues/18291\n    #[error(\"Requested to load an asset path ({0:?}) with a subasset, but this is unsupported. See issue #18291\")]\n    RequestedSubasset(AssetPath<'static>),\n    /// A general [`AssetLoadError`] for an asset dependency.\n    #[error(\"Failed to load dependency {dependency:?} {error}\")]\n    LoadError {\n        /// Which dependency failed.\n        dependency: AssetPath<'static>,\n        /// The original error for that dependency.\n        error: Box<AssetLoadError>,\n    },\n}\n\n/// An error that occurs while deserializing [`AssetMeta`].\n#[derive(Error, Debug, Clone, PartialEq, Eq)]\npub enum DeserializeMetaError {\n    /// Failed to deserialize the asset metadata.\n    #[error(\"Failed to deserialize asset meta: {0:?}\")]\n    DeserializeSettings(#[from] SpannedError),\n    /// Failed to deserialize the minimal asset metadata.","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_asset/src/loader.rs#L333-L369","documentation":"LoadDirectError::RequestedSubasset: the asset path being loaded ends in a subasset label (e.g. 'scene.gltf#Mesh0'), which the direct/nested load path does not support yet (bevy issue #18291). The whole asset must be loaded and the subasset selected afterwards.","triggerScenarios":"Thrown at crates/bevy_asset/src/loader.rs:351 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the #label from the path passed to the direct load and select the subasset from the loaded result instead","Track upstream issue bevyengine/bevy#18291 for subasset-aware direct loads","Restructure assets so the needed data is the primary asset"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}