Fixed sprite caching
parent
a8fd4e8ba1
commit
09f28d28f5
|
|
@ -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()?;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue