How do i export a drop down list?

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

the title

Like, to a file?

exuin | 2020-09-19 22:28

:bust_in_silhouette: Reply From: newold

you can do an enum and export it:

enum MYDROPDOWNLIST {VALUE1, VALUE2, VALUE3, VALUE4}
export(MYDROPDOWNLIST ) var my_variable_in_inspector

I was using enums for NPC types and this is an efficient answer for me. Thanks.

Fedar | 2021-07-05 16:42

:bust_in_silhouette: Reply From: Thomas Karcher

Do you mean a variable exported for editing in the property editor? In this case, like this:

export (String, "Rebecca", "Mary", "Leah") var character_name

(Taken from GDScript exports — Godot Engine (stable) documentation in English , where you will find many similar examples)

What if I need to select one value from the array of strings?

Robotex | 2022-05-09 21:26