summaryrefslogtreecommitdiffstats
path: root/core/object/script_language.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/object/script_language.cpp')
-rw-r--r--core/object/script_language.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp
index 820296e66d..0b528e908a 100644
--- a/core/object/script_language.cpp
+++ b/core/object/script_language.cpp
@@ -31,7 +31,6 @@
#include "script_language.h"
#include "core/config/project_settings.h"
-#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h"
#include "core/io/resource_loader.h"
@@ -698,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;
}