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:
Juan Linietsky 2016-09-07 19:39:02 -03:00
parent 19bd661a8f
commit 828e1c092f
13 changed files with 55 additions and 60 deletions

View file

@ -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);