-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow GDExtensions to register virtual methods and call them on scripts (godot-cpp support) #1377
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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