14 lines
402 B
GDScript
14 lines
402 B
GDScript
# THIS SCRIPT WILL BE ADDED AS PART OF MiniDemoTools soon
|
|
extends Node
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
(get_parent() as SubViewport).size = get_tree().get_root().get_viewport().size;
|
|
get_tree().get_root().size_changed.connect(resize)
|
|
|
|
|
|
|
|
func resize() -> void:
|
|
(get_parent() as SubViewport).size = get_tree().get_root().get_viewport().size;
|