Detecting scene save - replacement for AssetModificationProcessor.OnWillSaveAssets

In Unity 5, how does one detect when the user performs a save in the Editor, in order to run a validation script (like checking that certain necessary GameObjects exist)?

This used to be possible with AssetModificationProcessor.OnWillSaveAssets, but it seems to be obsolete now. The documentation page for AssetModificationProcessor says, confusingly:

Use UnityEditor.AssetModificationProcessor

iirc, there is a UnityEngine.AssetModificationProcessor but also a UnityEditor.AssetModificationProcessor. You’re using the UnityEngine one.

So change the class declaration to

class MyProcessor : UnityEditor.AssetModificationProcessor {
    // ...