Skip to content

Commit e7d2545

Browse files
authored
Load assets from root path when loading directly (#478)
1 parent 5447592 commit e7d2545

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
- [iOS: use shaderc-rs for glsl to spirv compilation][324]
3434
- [Changed the default node size to Auto instead of Undefined to match the Stretch implementation.][304]
3535
- Many improvements to Bevy's CI [#325][325], [#349][349], [#357][357], [#373][373], [#423][423]
36+
- [Load assets from root path when loading directly][478]
3637

3738
### Fixed
3839

@@ -83,6 +84,7 @@
8384
[423]: https://github.com/bevyengine/bevy/pull/423
8485
[428]: https://github.com/bevyengine/bevy/pull/428
8586
[433]: https://github.com/bevyengine/bevy/pull/433
87+
[478]: https://github.com/bevyengine/bevy/pull/478
8688

8789

8890
## Version 0.1.3 (2020-8-22)

crates/bevy_asset/src/asset_server.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ impl AssetServer {
239239

240240
// TODO: add type checking here. people shouldn't be able to request a Handle<Texture> for a Mesh asset
241241
pub fn load<T, P: AsRef<Path>>(&self, path: P) -> Result<Handle<T>, AssetServerError> {
242-
self.load_untyped(path).map(Handle::from)
242+
self.load_untyped(self.get_root_path()?.join(path))
243+
.map(Handle::from)
243244
}
244245

245246
pub fn load_sync<T: Resource, P: AsRef<Path>>(

0 commit comments

Comments
 (0)