bevyengine / bevyengine/bevy

AssetServer load_folder gives AssetFolderNotADirectory when it definitely is

Open
#5,308 8 comments 0 reactions 0 assignees View on GitHub
A-Assets C-Usability
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.7.0 from crates.io

## What you did

```
struct SpriteHandles(Vec);

fn load_textures(mut sprite_handles: ResMut, assets: Res) {
info!("Loading textures...");
sprite_handles.0 = assets.load_folder(".")
.expect("Failed to load textures");
}
```

## What went wrong

```
2022-07-13T12:08:14.321073Z INFO client: Loading textures...
thread 'main' panicked at 'Failed to load textures: AssetFolderNotADirectory(".")', client/src/main.rs:80:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

- expected it to load anything, probably more than it should
- errored out even though the currently directory does indeed exist

## Additional information

havent touched any asset server stuff in this project

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.