"When a value is changed..."

I want my script to do something when one of its Serializable varabies has been changed through the editor. (IE: Can't rely on a Setter function.)

Is there a simple way to do this?

I'd set another variable with the same value and check if they're equal constantly. If not, make your action happen and set the variable to the new value.

You could create a custom editor for the type. The editor would be active any time the properties of your object are being changed, so your editor code could check for changes, rather than putting it in the runtime Update. You can use Editor.DrawDefaultInspector to avoid re-implementing the editor functionality.

Alternatively you could tag your script to ExecuteInEditMode, but and use the C# pre-processor to remove the editor update code from your final build, like so ...

void Update()
{
    #if UNITY_EDITOR
    if (val != savedVal)
    {
        DoEditorStuff();
    }
    #endif
}

(Nope, doesn't work in javascript, sorry ...)