-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
I would want to load a script and execute a callback on the same frame. For instance, I load a scenario and I want to trigger the on_scenario_start function.
commands.queue(AddStaticScript::new(handle.clone()));
events.write(ScriptCallbackEvent::new_for_all_scripts(
OnTest,
vec![],
));I get :
2025-08-28T22:10:18.921977Z ERROR bevy_mod_scripting_core::handler: error in script `id AssetId<bevy_mod_scripting_core::asset::ScriptAsset>{ index: 0, generation: 0}`: Missing context for script id AssetId<bevy_mod_scripting_core::asset::ScriptAsset>{ index: 0, generation: 0}. Was the script loaded?..
Context:
Lua
Reproducing
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working