class_name Spawner extends Node3D

@export var object_to_spawn: PackedScene
@export var auto_spawn: bool = true

func _ready() -> void:
	if auto_spawn:
		spawn.call_deferred()

func spawn() -> void:
	var object = object_to_spawn.instantiate()
	object.position = position
	get_parent_node_3d().add_child(object)
