+6 votes

I know enums are a new thing in Godot, well kind of. Is it possible to export and enum property yet? Or is it just better for now to use the old way of doing pseudo enums.

in Engine by (269 points)

2 Answers

+1 vote

I found that It will be available in Godot 3.0
https://github.com/godotengine/godot/pull/12952

by (72 points)
+21 votes

In 3.0:

enum DROPOFF { linear,square,none }
export(DROPOFF) var dropoff = DROPOFF.linear

In the editor this will appear as a drop down with 3 options.

by (684 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.