0
\$\begingroup\$

In Godot 3, you could do this:

export var (Array, Resource) test_variable

I tried to recreate this in Godot 4, but I could not figure out how. This is what I tried:

@export var test_variable : (Array, Resource)

It does not work. How could I accomplish this in Godot 4?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I have figured out the answer to this question. The answer is simple:

@export var test_variable : Array[Resource]

You can do this to create an Array of any node type. Just put the node type within the square brackets of the Array class and that's it!

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .