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.
This commit is contained in:
Alice Cecile 2024-09-09 11:33:29 -04:00 committed by GitHub
parent fab0e5d085
commit 3d30b0f9ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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".