Skip to content

Commit 3d30b0f

Browse files
Add basic docs to AssetMode (#15057)
# Objective We should attempt to document the entirety of bevy_assets. `AssetMode` is missing docs explaining what it is, how it's used and why it exists. ## Solution Add docs, focusing on the context in #10157.
1 parent fab0e5d commit 3d30b0f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/bevy_asset/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ pub struct AssetPlugin {
100100
pub meta_check: AssetMetaCheck,
101101
}
102102

103+
/// Controls whether or not assets are pre-processed before being loaded.
104+
///
105+
/// This setting is controlled by setting [`AssetPlugin::mode`].
106+
///
107+
/// When building on web, asset preprocessing can cause problems due to the lack of filesystem access.
108+
/// See [bevy#10157](https://github.com/bevyengine/bevy/issues/10157) for context.
103109
#[derive(Debug)]
104110
pub enum AssetMode {
105111
/// Loads assets from their [`AssetSource`]'s default [`AssetReader`] without any "preprocessing".

0 commit comments

Comments
 (0)