Custom Inspector Object Reset

Hey everyone,
I am just getting started with the new UIElements and currently I am creating a custom inspector for a Scriptable object. I have a bunch of elementst that are bound to properties in lists. When I reset the object in the Unity Editor by selecting Reset from the cog-menu these list elements of course are deleted, which breaks all those bindings and spams a whole bunch of errors.
Now I am wondering: Is there some sort of callback that lets me reset my Visual Element hierarchy when the object is reset? I could not find anything and it seems to me like this is an oversight. With IMGUI this was no problem as one was constantly recreating the UI each frame, but now that elements are more persistent we need a way to easiely reset the Visual Tree, for example by invoking CreateInspectorGUI again.

These are the errors I’m getting if anyone is interested:

This is something we want to improve i the future. For now, you have to poll the serialized properties yourself or bind them to a field and then react on the field value changes.

You can have a look at the “ArrayInspectorElement” code in that post: