mirror of
https://github.com/bevyengine/bevy.git
synced 2026-07-01 00:05:45 -04:00
2146899cb8
# 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
14 lines
592 B
Diff
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,
|