Skip to content

Commit 5ad736b

Browse files
committed
Add a comment explaining what should_load_dependencies is for.
1 parent 54e7691 commit 5ad736b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_asset/src/loader.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ pub enum DeserializeMetaError {
321321
/// Any asset state accessed by [`LoadContext`] will be tracked and stored for use in dependency events and asset preprocessing.
322322
pub struct LoadContext<'a> {
323323
pub(crate) asset_server: &'a AssetServer,
324+
/// Specifies whether dependencies that are loaded deferred should be loaded.
325+
///
326+
/// This allows us to skip loads for cases where we're never going to use the asset and we just
327+
/// need the dependency information, for example during asset processing.
324328
pub(crate) should_load_dependencies: bool,
325329
populate_hashes: bool,
326330
asset_path: AssetPath<'static>,

0 commit comments

Comments
 (0)