Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | lowpolygon |
How would I go about creating a public array of packed scenes ?
I tried
export (PackedScene) var packed = .
And I got some error about unable to convert type
and then I tried
export (Array) var packed =
but I cannot drag the scenes into inspector
Is there a way to create an array of specific type ?
Does anyone know the answer to this question in Godot 4? export(Array, PackedScene) is no longer valid syntax.
hunterloftis | 2023-04-07 15:01
I think I found it :
@export var my_ array:Array[PackedScene]
Bornide | 2023-04-10 06:58