Unity Editor, detect Save or Rebuild Event

Hi everyone!

My editor script requires a Refresh after the user saves or scripts are compiled. Update works, but it’s not perfect, since it triggers on many occasions.

Is there a methode or event to catch “Saving the Scene” and or “Rebuilding Scripts”?


static void OnScriptsReloaded() is static, is there a non-static approach?


Probably I could solve it with something like that:

public delegate void Methode();
public static event Methode Update;

public static void Refresh(){
	if (Update != null){

But is there an non-static approach (for simplicity)
What’s the event for saving?