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

15 lines
311 B
GDScript

extends StaticBody3D
@onready var label: Label3D = $Label
@export var text = "Default"
signal click(name: String)
func _on_click(event):
click.emit(text)
func set_entity_name(text):
assert(label != null, "Entity has to be added to the scene tree")
label.text = text.replace(".", "\n")
self.text = text