summaryrefslogtreecommitdiffstats
path: root/core/variant/variant_call.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2023-01-06 16:35:42 +0100
committerJuan Linietsky <reduzio@gmail.com>2023-01-06 22:37:25 +0100
commitd762a0395a27d523d73066708d0d8f0e9077f5fd (patch)
tree5b7618ecf6266299c80b0c004e0d569b012ea721 /core/variant/variant_call.cpp
parentb14f7aa9f92ff44135c283a9c88dab5ef9136d64 (diff)
downloadredot-engine-d762a0395a27d523d73066708d0d8f0e9077f5fd.tar.gz
Allow binding Callable arguments from an array
Restores 3.x functionality that was removed in the Signal/Callable refactor of 4.0. Fixes #64668. Implements https://github.com/godotengine/godot-proposals/issues/6034 Usage: ```GDScript callable.bindv([arg1,arg2,arg3]) ```
Diffstat (limited to 'core/variant/variant_call.cpp')
-rw-r--r--core/variant/variant_call.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 088e24ba6e..2182c988fb 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -2017,6 +2017,7 @@ static void _register_variant_builtin_methods() {
bind_method(Callable, get_object_id, sarray(), varray());
bind_method(Callable, get_method, sarray(), varray());
bind_method(Callable, hash, sarray(), varray());
+ bind_method(Callable, bindv, sarray("arguments"), varray());
bind_method(Callable, unbind, sarray("argcount"), varray());
bind_custom(Callable, call, _VariantCall::func_Callable_call, true, Variant);