immersive-home/content/ui/device/device.gd
2023-11-05 21:32:50 +01:00

13 lines
268 B
GDScript

extends StaticBody3D
@onready var label: Label3D = $Label
@export var id: String = "0"
signal click(id: String)
func _on_click(event):
click.emit(id)
func set_device_name(text):
assert(label != null, "Device has to be added to the scene tree")
label.text = text