{"record":{"id":"49710106fd486307","repo":"FyroxEngine/Fyrox","slug":"tile-set-load-failed-reason-e","errorCode":null,"errorMessage":"Tile set load failed! Reason: {e:?}","messagePattern":"Tile set load failed! Reason: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"fyrox-impl/src/scene/tilemap/brush.rs","lineNumber":277,"sourceCode":"    pub macros: BrushMacroInstanceList,\n    /// A record of whether the brush has changed since last time it was saved.\n    #[reflect(hidden)]\n    #[visit(skip)]\n    pub change_flag: ChangeFlag,\n}\n\nimpl TileMapBrush {\n    /// Return true after blocking to wait for the brush's tile set to load,\n    /// if the tile set loads successfully, or if the tile set has no brush.\n    /// Return false if any error occurs while trying to load the tile set.\n    pub fn block_until_tile_set_is_loaded(&self) -> bool {\n        let Some(tile_set) = self.tile_set.as_ref() else {\n            return true;\n        };\n        let tile_set = match block_on(tile_set.clone()) {\n            Ok(tile_set) => tile_set,\n            Err(e) => {\n                Log::err(format!(\"Tile set load failed! Reason: {e:?}\"));\n                return false;\n            }\n        };\n        if tile_set.is_ok() {\n            true\n        } else {\n            Log::err(\"Tile set load failed!\");\n            false\n        }\n    }\n    /// Return the tile set for this brush, blocking if the tile set is not yet\n    /// loaded. None is returned if this brush has no tile set or the tile set fails to load.\n    pub fn tile_set(&self) -> Option<TileSetResource> {\n        let tile_set = self.tile_set.as_ref()?;\n        let tile_set = match block_on(tile_set.clone()) {\n            Ok(tile_set) => tile_set,\n            Err(e) => {\n                Log::err(format!(\"Tile set load failed! Reason: {e:?}\"));","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-impl/src/scene/tilemap/brush.rs#L259-L295","documentation":"TileBrush::block_until_tile_set_is_loaded blocks on the tile set resource future; if the resource itself fails to load (Err from block_on), it logs the reason and reports the brush as not loaded (returns false). This signals an async resource load failure.","triggerScenarios":"Calling block_until_tile_set_is_loaded when the brush's tile_set resource failed to load (missing file, bad format, IO error).","commonSituations":"Tile set resource moved/deleted after the brush was saved; a typo in the tile set resource path; resource state corruption in the resource manager.","solutions":["Read the logged `Reason: {e:?}` for the underlying load error and fix it (usually file-not-found or format error).","Verify the tile set resource path embedded in the brush exists relative to the project.","Re-assign a valid TileSet resource to the brush in the editor.","Ensure the resource manager's file system watching root includes the tile set's location."],"exampleFix":"// before\nbrush.set_tile_set(TileSetResource::load(\"missing.tileset\"));\n// after\nlet ts = TileSetResource::load(\"tileset.tileset\");\nts.state().use_asset_data(|_, _| {}); // or otherwise verify it loads\nbrush.set_tile_set(ts);","handlingStrategy":"fallback","validationCode":"// verify resource loads before assigning\nlet ts = TileSetResource::load(path);\nassert!(ts.state().is_load_ok() || matches!(ts.state(), ResourceState::Pending(_)));","typeGuard":null,"tryCatchPattern":"if !brush.block_until_tile_set_is_loaded() {\n    Log::warn(\"tile set failed to load; check logged Reason and resource path\");\n    return;\n}","preventionTips":["Verify tile set file paths relative to the project root.","Never delete tile set assets referenced by brushes.","Watch the log for resource-load failures at startup."],"tags":["fyrox","tilemap","brush","resource-load"],"backgroundTag":"resource-not-found","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}