Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/bevy_asset/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ async-lock = "3.0"
crossbeam-channel = "0.5"
downcast-rs = "1.2"
disqualified = "1.0"
either = "1.13"
futures-io = "0.3"
futures-lite = "2.0.1"
blake3 = "1.5"
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ pub use handle::*;
pub use id::*;
pub use loader::*;
pub use loader_builders::{
DirectNestedLoader, NestedLoader, UntypedDirectNestedLoader, UntypedNestedLoader,
Deferred, DynamicTyped, Immediate, NestedLoader, StaticTyped, UnknownTyped,
};
pub use path::*;
pub use reflect::*;
Expand Down Expand Up @@ -689,7 +689,7 @@ mod tests {
for dep in ron.embedded_dependencies {
let loaded = load_context
.loader()
.direct()
.immediate()
.load::<CoolText>(&dep)
.await
.map_err(|_| Self::Error::CannotLoadDependency {
Expand Down
10 changes: 7 additions & 3 deletions crates/bevy_asset/src/loader.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
io::{AssetReaderError, MissingAssetSourceError, MissingProcessedAssetReaderError, Reader},
loader_builders::NestedLoader,
loader_builders::{Deferred, NestedLoader, StaticTyped},
meta::{AssetHash, AssetMeta, AssetMetaDyn, ProcessedInfoMinimal, Settings},
path::AssetPath,
Asset, AssetLoadError, AssetServer, AssetServerMode, Assets, Handle, UntypedAssetId,
Expand Down Expand Up @@ -290,7 +290,11 @@ impl<A: Asset> AssetContainer for A {
}
}

/// An error that occurs when attempting to call [`DirectNestedLoader::load`](crate::DirectNestedLoader::load)
/// An error that occurs when attempting to call [`NestedLoader::load`] which
/// is configured to work [immediately].
///
/// [`NestedLoader::load`]: crate::NestedLoader::load
/// [immediately]: crate::Immediate
#[derive(Error, Debug)]
#[error("Failed to load dependency {dependency:?} {error}")]
pub struct LoadDirectError {
Expand Down Expand Up @@ -550,7 +554,7 @@ impl<'a> LoadContext<'a> {

/// Create a builder for loading nested assets in this context.
#[must_use]
pub fn loader(&mut self) -> NestedLoader<'a, '_> {
pub fn loader(&mut self) -> NestedLoader<'a, '_, StaticTyped, Deferred> {
NestedLoader::new(self)
}

Expand Down
Loading