summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-10-25 00:10:08 +0000
committerGitHub <noreply@github.com>2024-10-25 00:10:08 +0000
commit9d96059e1c9a8da89d316dae15d0fec604b07a22 (patch)
treecee32a21c68b1d737fc0cbe52b2a0ff649016123 /modules/gdscript/gdscript.cpp
parenta22fcac9dc8ecca406a3267849954a5a5373dd11 (diff)
parent3679f5971aa431d37cc2acd5d459ed4b38aad26f (diff)
downloadredot-engine-9d96059e1c9a8da89d316dae15d0fec604b07a22.tar.gz
Merge pull request #801 from Spartan322/merge/1015a48
Merge commit godotengine/godot@1015a48
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r--modules/gdscript/gdscript.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 522932734d..d1e4c4ecf1 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -78,9 +78,16 @@ bool GDScriptNativeClass::_get(const StringName &p_name, Variant &r_ret) const {
if (ok) {
r_ret = v;
return true;
- } else {
- return false;
}
+
+ MethodBind *method = ClassDB::get_method(name, p_name);
+ if (method && method->is_static()) {
+ // Native static method.
+ r_ret = Callable(this, p_name);
+ return true;
+ }
+
+ return false;
}
void GDScriptNativeClass::_bind_methods() {