I have an exported Color and I want a method to be called everytime I change it in the Editor. As I understand in GDScript, this is possible with setget
. I tried the following
[Export]
private Color col {
get {return col;}
set {col = value; setColor(0, col);}
}
where setColor is the method I want to call (to change a child nodes material albedo). But this crashed the editor and i can't even open the project unless I delete .mono.
I know I can also define the class as a Tool and put setColor in the process method, but I would rather not call it every frame unnecessarily.