![]() ## Objective Add a test that reproduces #11111 (and partially #18267). The bug is that asset loader settings are effectively ignored if the same asset is loaded multiple times with different settings. ## Solution Add a unit test to `bevy_assets/lib.rs`. The test will be marked as `#[ignore]` until #11111 is fixed. ```rust // Load the same asset with different settings. let handle_1 = load(asset_server, "test.u8", 1); let handle_2 = load(asset_server, "test.u8", 2); // Handles should be different. assert_ne!(handle_1, handle_2); ``` ## Concerns I'm not 100% sure that the current behaviour is actually broken - I can't see anything in the asset system design docs that explicitly says different settings should create different asset ids. UPDATE: Sentiment from issue comments and discord varies between "bug" and "undesirable consequence of design decisions, alternatives should be explored". So I've concluded that the test is valid and desirable. ## Testing ```sh cargo test -p bevy_asset --features multi_threaded # Or to repro the issue: cargo test -p bevy_asset --features multi_threaded -- --ignored ``` |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |