Skip to content
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_script_method_list() output differs from get_method_list() on same script and neither return 'default_args[]' #55482

Closed
CrezyDud opened this issue Nov 30, 2021 · 2 comments · Fixed by #81079
Milestone

Comments

@CrezyDud
Copy link
Contributor

Godot version

v4.0.dev.custom_build [cf67f18]

System information

Linux, Vulkan

Issue description

get_method_list()

doesn't return arg types

and both always return an empty 'default_args[]' array

Steps to reproduce

extends Node

func test(arg, default_arg: String):
	pass

func _ready():
	for method in get_method_list():
		if method.name == "test":
			print(method.args, " default_args -> : ", method.default_args) #[{class_name:, hint:0, hint_string:, name:arg0, type:0, usage:7}, {class_name:, hint:0, hint_string:, name:arg1, type:0, usage:7}] default_args -> : []
	for method in get_script().get_script_method_list():
		if method.name == "test":
			print(method.args, " default_args -> : ", method.default_args) #[{class_name:, hint:0, hint_string:, name:arg, type:0, usage:524295}, {class_name:, hint:0, hint_string:, name:default_arg, type:4, usage:7}] default_args -> : []

Minimal reproduction project

No response

@Calinou Calinou added this to the 4.0 milestone Nov 30, 2021
@Calinou
Copy link
Member

Calinou commented Nov 30, 2021

Related to #33624.

Does this bug also occur on 3.4?

@Xrayez
Copy link
Contributor

Xrayez commented Nov 30, 2021

Does this bug also occur on 3.4?

Yes, see godotengine/godot-proposals#3614.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants