-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_method_list() returns an incorrect info about custom functions #33624
Comments
Hello, I have been looking into to this issue and want to clarify that the output should be: I'm assuming the second scenario, but any correction or advice would be appreciated. |
Yes, see the output for the
These are the default values of optional arguments |
Hi the method 'get_method_list()' uses also the wrong "flags" for script added functions
but the info contains the value 65 for the property "flags" where is not defined in the enum Second problem is overwriten private functions like _init()or _ready() also listed under this flag I would prefear to update the enum and add a FLAG for private functions |
Those flags are powers of two and meant to be combined, so 65 means it's |
Ok thanks, but still some flags are marked as deprecated and no flag for static and private functions exists |
This bug is still valid on Godot Engine v3.2.3.stable.mono.official
The return type must be TYPE_INT When this bug will be fixed? |
Hi any news here? I need to collection info about arguments of custom functions |
Hi when working on a other item I see that Script..get_script_method_list() Has different functionality between GDscript and VisualScript.
Notice that Name is missing in the GD args. I have successfully tried code below. And assume this is not the best way to do this.
Don't know if it helps just wanted to share my finding. PS: In the GDscript example I would expect the default args |
This comment has been minimized.
This comment has been minimized.
@CrezyDud Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
I wrote a parser that uses the scripts source code and returns all the method definitions, the return type and their argument types. Just in case anyone needs it ill post it here.
Here is how to use it, I used a
output
This is the source code that i used in the above example:
You can even define your test definitions (for testing) like this:
|
Godot version:
3.1.1.stable.official
3.2.beta1.official
OS/device including version:
Linux
Issue description:
See the title above and the example below.
Steps to reproduce:
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: