class_name WorldEnvironmentProxy
extends Node

@export var environment: Environment
#@export var camera_attributes: CameraAttributes
#@export var compositor: Compositor

#var world_environment: WorldEnvironment


func _enter_tree() -> void:
	if not is_node_ready():
		await ready

	get_viewport().world_3d.environment = environment


func _exit_tree() -> void:
	if get_viewport().world_3d.environment == environment:
		get_viewport().world_3d.environment = null
