mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Core: Fix Object::has_method()
for script static methods
This commit is contained in:
parent
bfd78bb917
commit
ed0b3c08e1
9 changed files with 40 additions and 1 deletions
|
@ -666,8 +666,16 @@ bool Object::has_method(const StringName &p_method) const {
|
|||
}
|
||||
|
||||
MethodBind *method = ClassDB::get_method(get_class_name(), p_method);
|
||||
if (method != nullptr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return method != nullptr;
|
||||
const Script *scr = Object::cast_to<Script>(this);
|
||||
if (scr != nullptr) {
|
||||
return scr->has_static_method(p_method);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Variant Object::getvar(const Variant &p_key, bool *r_valid) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue