Skip to content

Commit c355a34

Browse files
committed
refactor: Use 2-arity for on_script_reloaded().
Two arguments every time. The second argument may be Unit/nil.
1 parent f70b5c9 commit c355a34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_mod_scripting_core/src/commands.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl<P: IntoScriptPluginParams> Command for CreateOrUpdateScript<P> {
200200
&OnScriptReloaded::into_callback_label(),
201201
&self.id,
202202
Entity::from_raw(0),
203-
vec![ScriptValue::Bool(true)],
203+
vec![ScriptValue::Bool(true), ScriptValue::Unit],
204204
guard.clone(),
205205
) {
206206
Ok(state) => {
@@ -226,7 +226,7 @@ impl<P: IntoScriptPluginParams> Command for CreateOrUpdateScript<P> {
226226
&OnScriptReloaded::into_callback_label(),
227227
&self.id,
228228
Entity::from_raw(0),
229-
vec![ScriptValue::Bool(true)],
229+
vec![ScriptValue::Bool(true), ScriptValue::Unit],
230230
guard.clone(),
231231
) {
232232
Ok(state) => {

0 commit comments

Comments
 (0)