From 3d30b0f9acd0e2ac7ce7c43cd498815956dbe202 Mon Sep 17 00:00:00 2001 From: Alice Cecile Date: Mon, 9 Sep 2024 11:33:29 -0400 Subject: [PATCH] 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 https://github.com/bevyengine/bevy/issues/10157. --- crates/bevy_asset/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs index f7787fb809719..b42b4436f989b 100644 --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -100,6 +100,12 @@ pub struct AssetPlugin { pub meta_check: AssetMetaCheck, } +/// Controls whether or not assets are pre-processed before being loaded. +/// +/// This setting is controlled by setting [`AssetPlugin::mode`]. +/// +/// When building on web, asset preprocessing can cause problems due to the lack of filesystem access. +/// See [bevy#10157](https://github.com/bevyengine/bevy/issues/10157) for context. #[derive(Debug)] pub enum AssetMode { /// Loads assets from their [`AssetSource`]'s default [`AssetReader`] without any "preprocessing".