How to convert an array to an enum or how to export an array with a select?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By zkmark

I need to be able to select the value inside an array from the godot inspector

var my_array = ['val 1', 'val 2', 'val 3']
@export var my_array_export = my_array

enum LOL {ONE, TWO}
@export var lol_export:LOL

For example, the variable lol_export allows you to select one of several values.

but the my_array_export variable only shows the values that are in the array and does not allow one to be selected

:bust_in_silhouette: Reply From: PickDough

Hi!

Here is an example from my project

@export_enum('A', 'B', 'C', 'D', 'E') var letter: String