mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 20:53:15 +00:00
Lookup method also in base scripts of a PlaceHolderScriptInstance
This commit is contained in:
parent
8a6c1e8f52
commit
175e5bcf4e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user