Skip to content

Conversation

@geekrelief
Copy link
Contributor

Fixes #87
Now adding gdExport on a method exports it like proc. So method doIt() {.gdExport.} exports as do_it instead of _do_it. So godot can find our virtual methods that don't begin with underscores.

@endragor
Copy link
Member

endragor commented Feb 4, 2021

As I mentioned in #87, this would break method process and most other methods. The proper fix, in my opinion, would be to allow to override the exported name, like this: method doIt() {.gdExport: "do_it".}.

@geekrelief
Copy link
Contributor Author

I've tested it in my code base with classes that have method process, enter_tree, init etc. Everything seems to be working fine. This doesn't change their existing behavior and brings method inline how gdExport works on proc and var, as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

method assumes virtual methods always start with an underscore

2 participants