From c27559cef399db2619847c6afd042f4ccc18a7e0 Mon Sep 17 00:00:00 2001 From: Kim L Date: Wed, 27 Mar 2024 23:12:54 +0100 Subject: [PATCH] fixed duplication of path in tilesheet loading --- examples/helpers/tiled.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/helpers/tiled.rs b/examples/helpers/tiled.rs index e36f9a1a..28932277 100644 --- a/examples/helpers/tiled.rs +++ b/examples/helpers/tiled.rs @@ -161,14 +161,8 @@ impl AssetLoader for TiledLoader { } } Some(img) => { - // The load context path is the TMX file itself. If the file is at the root of the - // assets/ directory structure then the tmx_dir will be empty, which is fine. - let tmx_dir = load_context - .path() - .parent() - .expect("The asset load context was empty."); - let tile_path = tmx_dir.join(&img.source); - let asset_path = AssetPath::from(tile_path); + + let asset_path = AssetPath::from(img.source.clone()); let texture: Handle = load_context.load(asset_path.clone()); TilemapTexture::Single(texture.clone())