From 2f651277dac25ca8628102068929e3cf3e245904 Mon Sep 17 00:00:00 2001 From: reduz Date: Sat, 19 Mar 2022 13:18:52 +0100 Subject: Add static method support to ClassDB * Based on the work done for Variant in the past. * Added `ClassDB::bind_static_method` * Cleaned up ClassDB::bind_method to use variadic templates. This adds support for having static methods in Object derived classes. Note that this does not make it work yet in GDScript or Mono and, while it works for GDExtension, GodotCPP needs to be updated. --- core/object/method_bind.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/object/method_bind.cpp') diff --git a/core/object/method_bind.cpp b/core/object/method_bind.cpp index 32269b5f19..a79adb7c6c 100644 --- a/core/object/method_bind.cpp +++ b/core/object/method_bind.cpp @@ -83,6 +83,10 @@ void MethodBind::_set_const(bool p_const) { _const = p_const; } +void MethodBind::_set_static(bool p_static) { + _static = p_static; +} + void MethodBind::_set_returns(bool p_returns) { _returns = p_returns; } -- cgit v1.2.3