From 38af46eb6e86cf2d9ad538d03ead0e89674cd646 Mon Sep 17 00:00:00 2001 From: jabu Date: Wed, 13 Nov 2024 06:52:04 -0600 Subject: [PATCH] use asset_path instead of path for texture loading --- src/assets.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/assets.rs b/src/assets.rs index 25a4735..d65ee38 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -1,4 +1,4 @@ -use std::{path::Path, sync::Arc}; +use std::sync::Arc; use bevy::{ asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext}, @@ -44,9 +44,10 @@ impl AssetLoader for AtlasLoader { atlas: Arc::new(rusty_spine::Atlas::new( &bytes, load_context - .path() + .asset_path() .parent() - .unwrap_or_else(|| Path::new("")), + .map(|path| path.to_string()) + .unwrap_or_default(), )?), }) }