【发布时间】:2022-12-02 13:41:33
【问题描述】:
I\'m trying to pass an array as a hint in string export, something like this:
extends Node
var things_list=[\"thing_1\", \"thing_2\", \"thing_3\"]
export(String,*things_list) var current_thing=things_list[0]
why am I doing this?
I want to reuse the things_list & to do so I have to tediously write all the same values twice,
once in this list itself & once in export like this:
extends Node
var things_list=[\"thing_1\", \"thing_2\", \"thing_3\"]
export(String,\"thing_1\", \"thing_2\", \"thing_3\") var current_thing=things_list[0]
this becomes really annoying with longer lists,
So is there anything like ...array in js
or something like *args in python? (as shown in the first example)
or are the values somehow stored in the export variable itself?
maybe like current_thing.export_hints[1] #thing_2