mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
fix scene_viewer example on wasm (#4426)
The scene viewer example doesn't run on wasm because it sets the asset folder to `std::env::var("CARGO_MANIFEST_DIR").unwrap()`, which isn't supported on the web. Solution: set the asset folder to `"."` instead.
This commit is contained in:
parent
73edb11db6
commit
7e3637c36f
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ Controls:
|
|||
brightness: 1.0 / 5.0f32,
|
||||
})
|
||||
.insert_resource(AssetServerSettings {
|
||||
asset_folder: std::env::var("CARGO_MANIFEST_DIR").unwrap(),
|
||||
asset_folder: std::env::var("CARGO_MANIFEST_DIR").unwrap_or_else(|_| ".".to_string()),
|
||||
watch_for_changes: true,
|
||||
})
|
||||
.insert_resource(WindowDescriptor {
|
||||
|
|
Loading…
Reference in a new issue