bevy_mod_scripting icon indicating copy to clipboard operation
bevy_mod_scripting copied to clipboard

:bug: Adding and remove script in the same function causes error

Open Ownezx opened this issue 4 months ago • 0 comments

Summary

I was trying to get a behaviour similar to before. I was using the fact that loading a script executed it to register scenarios to my app.

After my upgrade from BMS 0.13, I'm unsure how to reproduce the same behavior as before. I tried adding adding and removing the scenario on the same frame:

commands.queue(AddStaticScript::new(handle.clone()));
commands.queue(RemoveStaticScript::new(handle.clone()));

I got

2025-08-28T22:10:18.922027Z  WARN bevy_mod_scripting_core::commands: Attempted to delete static script id AssetId<bevy_mod_scripting_core::asset::ScriptAsset>{ index: 0, generation: 0}, but it was not found

Reproducing

https://github.com/Ownezx/bms_min_repro/issues

Ownezx avatar Aug 28 '25 22:08 Ownezx