Allow GDExtensions to register virtual methods and call them on scripts (godot-cpp support)#1377
Conversation
da9098a to
a969e47
Compare
|
I've been waiting for this feature for over a year. Thank you so much. Glad to see an example. 4.3 will be great for plugin. |
a969e47 to
8fbb7cf
Compare
akien-mga
left a comment
There was a problem hiding this comment.
Didn't review in depth, but looks good at a glance. We merged the upstream counterpart so this could be merged now.
|
I finally got back to the code I needed this feature. I have noticed that the macros defined in the gdvirtual.gen.inc file begin with Is this intended? EDIT: I attempted to create a custom macro copying the original one but adding the explicit |
Nope! This is probably just an artifact of those macros starting out as a copy of the same macros from Godot. |
|
Thanks for the answer. I think it will be best for me to answer about the fix in the PR itself. |
This depends on PR godotengine/godot#87758
It adds APIs compatible with Godot's, including the following macros:
GDVIRTUAL*()(likeGDVIRTUAL0R(),GDVIRTUAL2C(), etc)GDVIRTUAL_BIND()GDVIRTUAL_CALL()GDVIRTUAL_IS_OVERRIDDEN()It also adds an automated test for this functionality to CI.
NOTE: The tests here will fail until after the Godot PR is merged! However, they are passing for me locally.
Fixes #1199
Fixes #1072
Fixes #910