Exporting enumerations #473
migueldeicaza
started this conversation in
General
Replies: 3 comments
-
The following works beautifully:
However, adding |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the feedback. I have updated the branch with additional fixes. One of the limitations is that exporter enumerations must be backed by an Int64. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The version that got merged no longer requires the enumeration to be backed by an Int64, it will now cast to any integral value. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
One of the tasks that has been on the back burner for a while is to expose variables that are enumerations to Godot, this issue has been tracked in #128 and I have now a proof of concept and would love some testing.
The code lives in the
exportEnum
branch.To use it, make your enumeration
CaseIterable
and also make it conform toInt
:And then to export this, use the
.enum
parameter to Export:Would love for people to take this for a spin, and if it works, I can merge it into main.
Update: Originally, I had thought about using
ExportEnum
, and Brandon Munshaw suggested usingExport(.enum)
instead, so I went with that option.Beta Was this translation helpful? Give feedback.
All reactions