Merge pull request #93452 from raulsntos/core/placeholder-has-method

Lookup method also in base scripts of a PlaceHolderScriptInstance
This commit is contained in:
Rémi Verschelde 2024-06-22 16:22:27 +02:00
commit ded2a4ae54
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -697,7 +697,13 @@ bool PlaceHolderScriptInstance::has_method(const StringName &p_method) const {
}
if (script.is_valid()) {
return script->has_method(p_method);
Ref<Script> scr = script;
while (scr.is_valid()) {
if (scr->has_method(p_method)) {
return true;
}
scr = scr->get_base_script();
}
}
return false;
}