Event to listen to Prefab overrides being reverted

Hi all, I’m trying to find an event to listen to when an override, or any override, has been reverted using the Overrides dropdown on a Prefab.

Basically:

  • My prefab has some overrides
  • I use the Overrides dropdown and choose Revert All
  • I want a script on it to be notified

I can figure out which overrides have been removed… but I need at least an event to work from.

I tried PrefabUtility.prefabInstanceUpdated and it’s no good, as it only triggers on Apply. Revert doesn’t update an instance, it just removes the overrides from it.

Thanks!

As an alternative… I am using UI Toolkit, and a bunch of PropertyFields. I want those fields to react to when I Revert/Apply. Right now, if I revert they immediately snap to the correct value, but the little blue line to the left doesn’t go away. It’s as if they need to be updated/repainted. That’s why I was looking for an event.

Is there another way?