bevyengine / bevyengine/bevy

Warn that loading asset using a `PathBuf` does not handle labels

Open
#19,242 4 comments 0 reactions 0 assignees View on GitHub
A-Assets C-Bug C-Usability S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Currently trying to load an asset passing a `PathBuf` with a label tries to load an asset with the label as part of the extension.

## What solution would you like?

Add a warning that `PathBuf` does not support loading labeled assets

## Additional context

doing `asset_server.load(PathBuf::from("a.test#Test"))` gives a `Path not found` error because the path that the `AssetReader` receives is `a.test#Test` instead of `a.test`

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.