Is this possible to do? (Store array in a variable and then assign the variable to the exported dropdow list)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SamuelMb
var arr = ["Mixed", "Meat", "Vegetable", "Synthetic", "Mineral"]

export (String, arr) var diet = "Vegetable"
export (String, arr) var product = "Meat"

Bellow you see the right way to do it. Above you see the way I want to do it. Is this possible to do? Can I store the array in a variable and then drop the array into the export code?

export (String, "Mixed", "Meat", "Vegetable", "Synthetic", "Mineral") var product = "Meat"
export (String, "Mixed", "Meat", "Vegetable", "Synthetic", "Mineral") var diet = "Meat"
:bust_in_silhouette: Reply From: njamster

Is this possible to do?

No. You can find examples of everything that’s possible here. Given that GDscript is currently reworked for Godot 4.0, you might want to propose a change though.