movie-quote/debug_object.gd

35 lines
553 B
GDScript3
Raw Permalink Normal View History

2026-03-29 21:58:57 +00:00
#@tool
#@icon(icon_path: String)
class_name DebugObject
extends HBoxContainer
## Documentation comments
#signal
#enum
#const
var target: Node
var variable: StringName
#@onready var
@onready var debug_label: Label = $DebugLabel
@onready var debug_value: Label = $DebugValue
## OVERRIDES
func _ready() -> void:
if target and variable:
debug_label.text = variable.to_pascal_case() + ": "
func _process(_delta: float) -> void:
if target:
debug_value.text = str(target.get(variable))
## CORE
## PRIVATE/HELPER
## RECEIVERS
## SETTERS/GETTERS