Fixed sprite caching

master
hheik 2023-09-28 01:07:31 +03:00
parent a8fd4e8ba1
commit 09f28d28f5
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ pub fn load_url_asset(
assets: &Res<AssetServer>, assets: &Res<AssetServer>,
) -> Result<Handle<Image>, Box<dyn std::error::Error>> { ) -> Result<Handle<Image>, Box<dyn std::error::Error>> {
let system_path = Path::new("assets").join(&path); let system_path = Path::new("assets").join(&path);
if Path::exists(&path) { if Path::exists(&system_path) {
return Ok(assets.load(path)); return Ok(assets.load(path));
} }
let data = reqwest::blocking::get(&url)?.bytes()?; let data = reqwest::blocking::get(&url)?.bytes()?;