Expose is_required in extension API for virtual methods #9982
Replies: 2 comments 6 replies
-
This is an interesting idea! I guess we could include whether or not it's required in the definition (maybe via an extension to the Then I guess it'd be a question of whether or not we think it's worth changing all the @Bromeon What do you think about this? |
Beta Was this translation helpful? Give feedback.
-
This has been implemented in godotengine/godot#93311 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The engine currently does not expose if a virtual method is required to be implemented or not. The only indicator for a method to be required is if there is any call to it via
GDVIRTUAL_REQUIRED_CALL
at runtime.It would be beneficial to GDExtensions if virtual methods were marked as required and only then
GDVIRTUAL_REQUIRED_CALL
could be called on them. The engine should then also expose ais_required
field inextension_api.json
.Bindings like godot-rust/gdext could then handle these required methods appropriately, e.g. fail the compilation if a method has not been implemented.
EDIT: Related issue in godot-rust/gdext#192 (comment)
Beta Was this translation helpful? Give feedback.
All reactions