Load assets from root path when loading directly (#478)
This commit is contained in:
parent
5447592c07
commit
e7d254517e
@ -33,6 +33,7 @@
|
|||||||
- [iOS: use shaderc-rs for glsl to spirv compilation][324]
|
- [iOS: use shaderc-rs for glsl to spirv compilation][324]
|
||||||
- [Changed the default node size to Auto instead of Undefined to match the Stretch implementation.][304]
|
- [Changed the default node size to Auto instead of Undefined to match the Stretch implementation.][304]
|
||||||
- Many improvements to Bevy's CI [#325][325], [#349][349], [#357][357], [#373][373], [#423][423]
|
- Many improvements to Bevy's CI [#325][325], [#349][349], [#357][357], [#373][373], [#423][423]
|
||||||
|
- [Load assets from root path when loading directly][478]
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
@ -83,6 +84,7 @@
|
|||||||
[423]: https://github.com/bevyengine/bevy/pull/423
|
[423]: https://github.com/bevyengine/bevy/pull/423
|
||||||
[428]: https://github.com/bevyengine/bevy/pull/428
|
[428]: https://github.com/bevyengine/bevy/pull/428
|
||||||
[433]: https://github.com/bevyengine/bevy/pull/433
|
[433]: https://github.com/bevyengine/bevy/pull/433
|
||||||
|
[478]: https://github.com/bevyengine/bevy/pull/478
|
||||||
|
|
||||||
|
|
||||||
## Version 0.1.3 (2020-8-22)
|
## Version 0.1.3 (2020-8-22)
|
||||||
|
@ -239,7 +239,8 @@ impl AssetServer {
|
|||||||
|
|
||||||
// TODO: add type checking here. people shouldn't be able to request a Handle<Texture> for a Mesh asset
|
// TODO: add type checking here. people shouldn't be able to request a Handle<Texture> for a Mesh asset
|
||||||
pub fn load<T, P: AsRef<Path>>(&self, path: P) -> Result<Handle<T>, AssetServerError> {
|
pub fn load<T, P: AsRef<Path>>(&self, path: P) -> Result<Handle<T>, AssetServerError> {
|
||||||
self.load_untyped(path).map(Handle::from)
|
self.load_untyped(self.get_root_path()?.join(path))
|
||||||
|
.map(Handle::from)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_sync<T: Resource, P: AsRef<Path>>(
|
pub fn load_sync<T: Resource, P: AsRef<Path>>(
|
||||||
|
Loading…
Reference in New Issue
Block a user