You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #87680 from AThousandShips/the_angry_count
Add methods to get argument count of methods
This commit is contained in:
@@ -102,6 +102,22 @@ Dictionary Script::_get_script_constant_map() {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Script::get_script_method_argument_count(const StringName &p_method, bool *r_is_valid) const {
|
||||
MethodInfo mi = get_method_info(p_method);
|
||||
|
||||
if (mi == MethodInfo()) {
|
||||
if (r_is_valid) {
|
||||
*r_is_valid = false;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (r_is_valid) {
|
||||
*r_is_valid = true;
|
||||
}
|
||||
return mi.arguments.size();
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
PropertyInfo Script::get_class_category() const {
|
||||
|
||||
Reference in New Issue
Block a user