Godot Version
4.3
Question
Is there a way to get if a node’s property changed without constantly checking if its value changed or giving that node a script? Like how you can do in that property’s setter function?
Thanks in advance!
4.3
Is there a way to get if a node’s property changed without constantly checking if its value changed or giving that node a script? Like how you can do in that property’s setter function?
Thanks in advance!
You can use the setter getter of godot:
signal variable_changed
var my_variable:
get:
return my_variable
set (value):
if value != my_variable:
variable_changed.emit()
my_variable = value
But you would have to add a script to the property’s owner, so is there a way around this?
From what i know, no, you need to check the value or use the set/get inside the node script
sigh
Thank you two anyway!