bevyengine / bevyengine/bevy

Inconsistant asset loading path between platforms in workspaces

Open
#1,964 1 comment 0 reactions 0 assignees View on GitHub
A-Assets C-Bug O-Android O-Web
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.5

## Operating system & version

Manjaro-21-0.2

## What you did

Example repo: https://github.com/SarthakSingh31/bevy_workspace

I tired to load assets from inside a crate in a workspace on a native build and a `wasm32-unknown-unknown` build.

## What you expected to happen

Bevy loads the assets from the same path.

## What actually happened

Bevy tries to load the assets from different paths.

On native it uses `FileAssetIo` which looks for the assets in the crate. (in the example repo it looks for `/test_workspace/test_crate/assets`)

On wasm it uses `WasmAssetIo`which looks for the crate in the execution path which in this case is the workspace path. (in the example repo it looks for `/test_workspace/assets`)

## Additional information

I think `AndroidAssetIo` might have the same issue.

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.