Hello all,
I am trying to follow this tutorial https://www.youtube.com/watch?v=R-u1EY9fOJQ&list=PL2wAo2qwCxGDp9fzBOTy_kpUTSwM1iWWd&index=2
However, I am a bit stuck to why my code does not work?
Here is the gist of it, my workspace is set up to have a parent folder called "mini-games" and then subsequent folders containing different mini-games (see image below)
Currently I only have 1, the one in the tutorial.
In my spaceship.rs file is the following function:
// <--- Systems ---> //
fn spawn_spaceship(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(SpaceShipBundle {
velocity: Velocity(START_VELOCITY),
model: SceneBundle {
scene: asset_server.load("./Spaceship.glb#Scene0"),
transform: Transform::from_translation(START_TRANSLATION),
..default()
},
});
}
The error arrises from the asset_server.load("") line. However, I am not entirely sure why.
When I run the command:
cargo run -p spaceship
Here is the error I get:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }```
When I remove the `#Scene0` (aka the line becomes asset_server.load("./Spaceship.glb"),) I now get this error:
ERROR bevy_asset::server: Could not find an asset loader matching: Loader Name: None; Asset Type: None; Extension: None; Path: Some("./Spaceship.glb");
What could be causing this issue?
Thank you all in advance.
Welcome to 'Bevy Basics: Game Development Essentials in Bevy.'
This episode covers 3D basics, resources, and organizing code!
If you haven't seen the first episode yet, you can find it here:
https://www.youtube.com/watch?v=B6ZFuYYZCSY.
Series Playlist:
https://www.youtube.com/playlist?list=PL2wAo2qwCxGDp9fzBOTy_kpUTSwM1iWWd
You can find th...