ExecuteInEditMode Deciding when to update

This is the first time I try to write a script that runs in Edit Mode

What I can’t wrap my head around is how to decide when to update without keeping a double for each flield like

private Int oldvalue;
public int newvalue

and Compare all my field values, which is very time consuming and overall inefficient.

Usually I would use properties like this

    private bool changed = false;
    private int test = 0;
    public int Test {
        get
        {
            return test;
        }
        set
        {
            if (test != value)
            {
                changed = true;
                test = value;
            }
        }
    }

but unity does not display properties in the UI for editing :frowning:

In the end I will need to destroy and recreate 100’s if not 1000’s of objects when an update is needed.

Will any of you point me in the right direction on how to this fast and effectively?

You can edit properties if you write your own editor that draws them. then you could also let the editor perform the update, removing the need for execute in editor.

is this what you are talking about?

Building a Custom Inspector
https://unity3d.com/learn/tutorials/modules/intermediate/editor/building-custom-inspector

Yes.