utilities_gamedev/data_manager/previews/ControlPreview.gd

15 lines
249 B
GDScript3
Raw Permalink Normal View History

2022-07-16 18:07:21 +02:00
tool
extends ViewportContainer
export(NodePath) var container_path : NodePath
var _container : Node
func _ready() -> void:
_container = get_node(container_path)
func preview(n: Control) -> void:
_container.add_child(n)
n.owner = _container