Skip to content

Commit

Permalink
Add basic docs to AssetMode (#15057)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
alice-i-cecile authored Sep 9, 2024
1 parent fab0e5d commit 3d30b0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down

0 comments on commit 3d30b0f

Please sign in to comment.