-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
Example:
EditorPlugin.has_main_screen is a virtual method, but does not have an underscore.
https://docs.godotengine.org/en/stable/classes/class_editorplugin.html#class-editorplugin-method-has-main-screen
method hasMainScreen():bool = trueuse of method on a proc assumes it's virtual
godot-nim/godot/nim/godotmacros.nim
Line 165 in 388bea9
| isVirtual: meth.kind == nnkMethodDef, |
and gdobj prepends an underscore to all method names.
godot-nim/godot/nim/godotmacros.nim
Line 608 in 388bea9
| let godotMethodName = if meth.isVirtual: "_" & toGodotStyle(meth.name) |
As a work around to override the virtual function you declare it as proc with gdExport like:
proc hasMainScreen():bool {.gdExport.} =
trueMetadata
Metadata
Assignees
Labels
No labels