diff --git a/Cargo.toml b/Cargo.toml index 580d625079..384ed1ffb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -341,6 +341,7 @@ path = "examples/run_script.rs" [[example]] name = "script_loading" path = "examples/script_loading.rs" +required-features = ["lua54"] [workspace.lints.clippy] panic = "deny" diff --git a/assets/tests/lifecycle/default/static_script/same_frame_callback/callback.lua b/assets/tests/lifecycle/default/static_script/same_frame_callback/callback.lua new file mode 100644 index 0000000000..c0dff08f63 --- /dev/null +++ b/assets/tests/lifecycle/default/static_script/same_frame_callback/callback.lua @@ -0,0 +1,3 @@ +function on_test(arg1) + return "got: " .. arg1 +end diff --git a/assets/tests/lifecycle/default/static_script/same_frame_callback/scenario.txt b/assets/tests/lifecycle/default/static_script/same_frame_callback/scenario.txt new file mode 100644 index 0000000000..03dc1f9f20 --- /dev/null +++ b/assets/tests/lifecycle/default/static_script/same_frame_callback/scenario.txt @@ -0,0 +1,13 @@ +SetCurrentLanguage language="@this_script_language" +InstallPlugin miliseconds_budget=999999 +SetupHandler OnTest=null, Update=null +SetupHandler OnTestPostUpdate=null, PostUpdate=null +SetupHandler Last=null, OnTestLast=null +FinalizeApp + +LoadScriptAs as_name="@this_script", path="@this_script" +WaitForScriptLoaded name="@this_script" +AttachStaticScript script="@this_script" +EmitScriptCallbackEvent emit_response=true, label="OnTest", language=null, recipients="StaticScript", script="@this_script", string_value="arg1" +RunUpdateOnce +AssertNoCallbackResponsesEmitted \ No newline at end of file