OnWillSaveAssets issue

How can I call a editor script when the unity editor loads a scene?
Some kind of OnAwake equivalent.

Or right before saving is good al well, I found this:
This does not apear to work, the log is not printing when I save the scene:

class SaveManagerEditor extends Editor
	function OnWillSaveAssets ()

The OnWillSaveAssets function needs to be static.

Also it has a return type of String array and takes an array of string.