Files
bevy/tools/example-showcase/asset-source-website.patch
andriyDev 2146899cb8 Add a few basic tests for asset processing. (#21409)
# Objective

- `bevy_asset` needs more tests! This adds three related to asset
processing.

## Solution

- Create a new `MemoryAssetWriter` to pair with `MemoryAssetReader`.
- Adds a way to override whether the asset processor is created or not.
- Make `Data::value` and `Data::path` `pub` so that we can actually see
what is written to the processed dir. Note: `Dir::get_asset` returns
`Data` already, but it isn't usable.
- Add three tests: one to test that assets are copied to the processed
dir for no-processing assets, one to test that using a default processor
works, and one to test that an asset meta file works.

## Testing

- This adds testing! :D
2025-10-07 01:23:58 +00:00

14 lines
592 B
Diff

diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs
index 81deeff145..7792d9f1ed 100644
--- a/crates/bevy_asset/src/lib.rs
+++ b/crates/bevy_asset/src/lib.rs
@@ -335,7 +335,7 @@
fn default() -> Self {
Self {
mode: AssetMode::Unprocessed,
- file_path: Self::DEFAULT_UNPROCESSED_FILE_PATH.to_string(),
+ file_path: "/assets/examples".to_string(),
processed_file_path: Self::DEFAULT_PROCESSED_FILE_PATH.to_string(),
watch_for_changes_override: None,
use_asset_processor_override: None,