mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +00:00
Renamed the bind_native functions to bind_vararg, should make it show the documentation more clearly and also make it easier to bind to C#
This commit is contained in:
parent
19bd661a8f
commit
828e1c092f
13 changed files with 55 additions and 60 deletions
|
|
@ -417,6 +417,14 @@ void VisualScriptFunctionCall::_update_method_cache() {
|
|||
|
||||
method_cache.return_val = mb->get_argument_info(-1);
|
||||
#endif
|
||||
|
||||
if (mb->is_vararg()) {
|
||||
//for vararg just give it 10 arguments (should be enough for most use cases)
|
||||
for(int i=0;i<10;i++) {
|
||||
method_cache.arguments.push_back(PropertyInfo(Variant::NIL,"arg"+itos(i)));
|
||||
use_default_args++;
|
||||
}
|
||||
}
|
||||
} else if (script.is_valid() && script->has_method(function)) {
|
||||
|
||||
method_cache = script->get_method_info(function);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue