Enums defined with enum classes in-engine are not using enum classes in godot-cpp #1620
Labels
enhancement
This is an enhancement on the current functionality
Milestone
Godot version
Godot master
godot-cpp version
Master of godot-cpp 6facde3
System information
macOS 14.6.1 arm64
Issue description
Enums such as
Key
,MouseButton
,MouseButtonMask
, and more usingenum class
in-engine are not usingenum class
in godot-cpp, they are just using regularenum
. Usingenum class
improves type safety, but I am not sure if Godot provides a mechanism for godot-cpp to know which enums are usingenum class
.This issue is not super important because there is an easy workaround. In my project, I am using these defines that only get used when compiling as a module, and writing
KEY_
in my code, which auto-replace when compiled as a module.Steps to reproduce
Try using one of the values in the
Key
enum in-engine vs in godot-cpp.Minimal reproduction project
Trivial to reproduce with one line of code in a new godot-cpp GDExtension project.
The text was updated successfully, but these errors were encountered: