Some quick experimentation indicates this might be most of what you want…
func _ready():
print(get_method_names())
func get_method_names():
var methods = []
for fun in get_method_list():
if fun["flags"] == METHOD_FLAG_NORMAL + METHOD_FLAG_FROM_SCRIPT:
methods.append(fun["name"])
return methods
Note, you’ll need to have a reference to the script you’re interested in. From there, you can call the scripts get_method_names method. Also, the flag references I have there seem to work in my tests, though there might be a better way to utilize them…
Amazing dude! Thanks a lot! You even did all of the work for me =)
Works like a charm. I just add it to the script that contains the functions, and then remove "get_method_names" from the resulting array.
NOTE: To all those who try to use this: this does NOT work for a script that contains static functions, since get_method_list() can only be called in script instances.