You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a quick declaration before further investigation, get_method_list() returns everything correctly on engine declared methods, but it does not on GDScript's. There, properties of arguments revert to defaults, like the name property gets arg0, arg1, ..., same as the types, hints, ...
To further clarify, here's a screenshot from a function I created in GDScript explicitly mentioning the type and the default value:
On a breakpoint after declaration of the variable "method", (= "test" from get_method_list())
You can first see that the variable with type int (= 2) just gets 0, same as the hint, hint_string, and the usage, which is always 7. This too applies on the second and third argument. (They are exactly thesame exept for the name: arg1 and arg2)
The default arguments, (the second and third argument on the method "test"), also do not appear.
And as you might've guessed, the "return" specifications also does not represent the one in the method.
Check for the Dictionary "method" in Locals in the debugger when you run the project.
There, you can open "args", "default_args" and the "return" specifications.
The text was updated successfully, but these errors were encountered:
The other issue is similar, but its not a duplicate. My confusion came from it being tagged topic:core, and mine is topic:gdscript, so I thought I could make a new one, and make it a bit more tidy than the previous xD
I added the "topic:gdscript" because it's the GDScript implementation of that method that has the bug. Other modules like VisualScript implemented the method but seems work fine.
It's fine to open an issue if you're not sure whether it's a duplicate :)
Godot version
v3.2.4.rc1.official
System information
Windows 10
Issue description
As a quick declaration before further investigation,
get_method_list()
returns everything correctly on engine declared methods, but it does not on GDScript's. There, properties of arguments revert to defaults, like the name property gets arg0, arg1, ..., same as the types, hints, ...To further clarify, here's a screenshot from a function I created in GDScript explicitly mentioning the type and the default value:
On a breakpoint after declaration of the variable "
method
", (= "test
" fromget_method_list()
)You can first see that the variable with type int (= 2) just gets 0, same as the hint, hint_string, and the usage, which is always 7. This too applies on the second and third argument. (They are exactly thesame exept for the
name
: arg1 and arg2)The default arguments, (the second and third argument on the method "
test
"), also do not appear.And as you might've guessed, the "
return
" specifications also does not represent the one in the method.issue #33624 is similar
Steps to reproduce
Create a method which you call in de ready function that
firstly iterates upon the get_method_list() in a for loop and stores the specific function, in my case "test", in a variable:
Then, create a breakpoint, or type
breakpoint
after the for loop:Finally, run the project and examine the results in the debugger.
Minimal reproduction project
Here: Minimal Reproduction Project of get_method_list() bug.zip you can find the minimal reproduction project.
There are comments in the Script.gd:
The text was updated successfully, but these errors were encountered: