Skip to content

Commit

Permalink
Revert changes to asset_loading example
Browse files Browse the repository at this point in the history
  • Loading branch information
bushrat011899 committed Feb 22, 2025
1 parent 501909a commit d1ab443
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions examples/asset/asset_loading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,13 @@ fn setup(
);

// All assets end up in their Assets<T> collection once they are done loading:
match meshes.get(&sphere_handle) {
Some(sphere) => {
// You might notice that this doesn't run! This is because assets load in parallel without
// blocking. When an asset has loaded, it will appear in relevant Assets<T>
// collection.
info!("{:?}", sphere.primitive_topology());
}
_ => {
info!("sphere hasn't loaded yet");
}
if let Some(sphere) = meshes.get(&sphere_handle) {
// You might notice that this doesn't run! This is because assets load in parallel without
// blocking. When an asset has loaded, it will appear in relevant Assets<T>
// collection.
info!("{:?}", sphere.primitive_topology());
} else {
info!("sphere hasn't loaded yet");
}

// You can load all assets in a folder like this. They will be loaded in parallel without
Expand Down

0 comments on commit d1ab443

Please sign in to comment.