immersive-home/content/ui/device/device.gd
2023-11-05 15:16:07 +01:00

13 lines
264 B
GDScript

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