godot-headers
godot-headers copied to clipboard
Default arguments in signals
There are default_args
, num_default_args
in godot_signal
and default_value
in godot_signal_argument
.
Based on source code for godot_nativescript_register_signal
(link to master, there are no changes to relevant part in question since third version) seems like default_args
are not used. Instead a number of num_default_args
default_value
s is collected from the start of args for use as defaults.
So seems like either default_args
or default_value
should be removed.
It seems wrong that default values are collected from the start and not the end of args
.
And usage
property in godot_signal_argument
seems meaningless (it is absent from godot_method_arg
for example).
Excuse me for necroposting, but a quick update: While these args are still present on 3.5
and 3.x
, the overhauled 4.0
GDExtension header (#107) does not expose them and whether they’re still present in the source code (I couldn’t search it) is not us header users’ concern.
I don't think it is necroposting as it is one of few open issues here. And as I understand until your PR is merged it is still valid one. After that, I guess, it can be close as I don't see default_args
in json of your PR.