clean syntax of something like "@export var myVar:Array[{int, PackedScene}]" ??

You can use Array[Dictionary], which is untyped and the best you’ll get cause you can’t create a typed dictionary with two types (int and PackedScene) for the values.

If you really want an ID, weight, and scene, you may need to create a class_name’d resource instead.

extends Resource
class_name RoomData

@export var id: int
@export var weight: int
@export var scene: PackedScene

# in pooling.gd
@export var room_pool: Array[RoomData]
1 Like