A Godot v4 game about working in an office
@tool

extends TextureRect

func _ready() -> void:
	get_tree().get_root().size_changed.connect(_on_viewport_size_changed)

func _on_viewport_size_changed() -> void:
	print("viewport size changed!!! " + str(get_tree().get_root().size.y))
	(material as ShaderMaterial).set_shader_parameter("screen_height", get_tree().get_root().size.y)