Execute code on editor variable value change

Hey, I’m working on some editor tools for the project I’m working on and I have a question: How can I make some code be executed when a certain variable is modified in the editor (if it’s even possible)? I already have an editor-only functionality that runs when using an additional menu option I created, but I want to make it automatic, and I was wondering if I can make that functionality be executed when a certain variable of an object placed in the level is modified.