-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
@Ownezx
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月28日T22: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