You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
GDScriptNativeClass: Allow getting static function as callable
This commit is contained in:
@@ -76,9 +76,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() {
|
||||
|
||||
Reference in New Issue
Block a user