broken_seals_2ds/game/addons/module_manager/previews/Node2DPreview.gd

15 lines
248 B
GDScript3
Raw Normal View History

2022-01-30 23:20:50 +01:00
tool
extends ViewportContainer
export(NodePath) var container_path : NodePath
var _container : Node
func _ready() -> void:
_container = get_node(container_path)
func preview(n: Node2D) -> void:
_container.add_child(n)
n.owner = _container