Bevy version
0.5.0.
Operating system & version
Windows 10.
What you did
- Insert code before this line (using
debug branch):
warn!(
"resource_handle: {:?} {:?} {}",
resource_handle,
asset_server.get_load_state(resource_handle.clone()),
resource_assets.get(resource_handle).is_some(),
);
-
Run the ui example (cargo run --example=ui).
-
If you manually click on the language change buttons, then everything is ok.
But if you use a mouse macro (or something else) for a very fast click, then the example ends with an error.
-
Log output:
WARN bevy_fluent::assets::localization: resource_handle: StrongHandle<ResourceAsset>(AssetPathId(AssetPathId(SourcePathId(17015584791912148938), LabelId(6298619649789039366)))) Loaded true
WARN bevy_fluent::assets::localization: resource_handle: StrongHandle<ResourceAsset>(AssetPathId(AssetPathId(SourcePathId(2475016618522967226), LabelId(6298619649789039366)))) Loaded true
WARN bevy_fluent::assets::localization: resource_handle: StrongHandle<ResourceAsset>(AssetPathId(AssetPathId(SourcePathId(17610828258912988862), LabelId(6298619649789039366)))) Loaded false
WARN bevy_fluent::assets::localization: resource_handle: StrongHandle<ResourceAsset>(AssetPathId(AssetPathId(SourcePathId(17872065453730569751), LabelId(6298619649789039366)))) Loaded false
You can see that the last two assets will have the status Loaded but get method return None.
What you expected to happen
For each asset that has LoadState::Loaded status, Assets.get always return Some.
What actually happened
You can see that some assets will have the status Loaded but get method return None.
Bevy version
0.5.0.Operating system & version
Windows 10.
What you did
debugbranch):Run the ui example (
cargo run --example=ui).If you manually click on the language change buttons, then everything is ok.
But if you use a mouse macro (or something else) for a very fast click, then the example ends with an error.
Log output:
You can see that the last two assets will have the status
Loadedbutgetmethod returnNone.What you expected to happen
For each asset that has
LoadState::Loadedstatus,Assets.getalways returnSome.What actually happened
You can see that some assets will have the status
Loadedbutgetmethod returnNone.