mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-03 18:09:13 +03:00
Allow GDExtensions to register virtual methods and call them on scripts
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <godot_cpp/variant/variant.hpp>
|
||||
|
||||
#include <godot_cpp/core/binder_common.hpp>
|
||||
#include <godot_cpp/core/gdvirtual.gen.inc>
|
||||
|
||||
using namespace godot;
|
||||
|
||||
@@ -181,6 +182,9 @@ public:
|
||||
// Virtual function override (no need to bind manually).
|
||||
virtual bool _has_point(const Vector2 &point) const override;
|
||||
virtual void _input(const Ref<InputEvent> &event) override;
|
||||
|
||||
GDVIRTUAL2R(String, _do_something_virtual, String, int);
|
||||
String test_virtual_implemented_in_script(const String &p_name, int p_value);
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(Example::Constants);
|
||||
|
||||
Reference in New Issue
Block a user