Skip to content

Commit

Permalink
Add a note about folder being recursive (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasEi committed Apr 30, 2022
1 parent d009a95 commit a8b6e4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ struct MyAssets {
}
```

If all assets in the folder have the same type you can load the folder as `Vec<Handle<T>>`. Just set `typed` in the `folder` attribute and adapt the type of the field.
Just like Bevy's `load_folder`, this will also recursively load sub folders.

If all assets in the folder have the same type you can load the folder as `Vec<Handle<T>>`. Just set `typed` in the `folder` attribute and adapt the type of the asset collection field.
```rust
use bevy::prelude::*;
use bevy_asset_loader::AssetCollection;
Expand Down

0 comments on commit a8b6e4a

Please sign in to comment.