godot-nim
godot-nim copied to clipboard
gdexport on method exports without transforming
Fixes https://github.com/pragmagic/godot-nim/issues/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.
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".}.
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.