0 votes
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"
asked Jul 2 in Engine by SamuelMb (28 points)

1 Answer

0 votes

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.

answered Jul 15 by njamster (9,522 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.