diff options
Diffstat (limited to 'core/object/script_language.cpp')
-rw-r--r-- | core/object/script_language.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index eb7d560a5d..0b528e908a 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -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; } |