When is Update called in edit mode?

I can’t tell exactly when it is called, it is certainly not each frame. It is called sometimes when I change something, but it looks like it is not always called.

When exactly is it called, and is there any way for me to signal an update is necessary from an editor script?

The editor redraw isn’t run in a gameloop like the games you create with Unity. It’s completely event based like every window in Windows ;).

OnInspectorGUI or OnGUI in EditorWindows are only called when it needs an update. This is for example when you move the mouse and stop moving for 1 sec the tooltips are displayed. Therefore a repaint is done.

For EditorWindows you can use EditorWindow.Repaint. The inspector should be fine.

If you need something that is executed regularly you can use a delegate to hook into the editor update (which runs about 100 times per sec.). This update have nothing to do with visual frames.

If you enable EditorWindow.wantsMouseMove for your windows the OnGUI function is called each time you move the mouse, but ONLY to pass a mouseMove event. Still no repaint is done. You can use this code to do a repaint when the mouse is moved.

// C#
void OnGUI()
{
    if (Event.current.type == EventType.MouseMove)
    {
        Repaint();
    }
}

If you care about updating the sceneview(s) you can use SetDirty like Tom 17 said or just call Repaint. You can Repaint any EditorWindow as long as you can access it. SetDirty only marks an object to be “dirty” and it needs to be repainted but i guess if ths object isn’t visible no repaint is executed (haven’t tried).

The SceneView is derived from EditorWindow.
SceneView.lastActiveSceneView gives you the last active sceneview (but check it for non null!!) SceneView.sceneViews is an array that includes all open sceneviews. The sceneview class isn’t documented but if you use Visual Studio you have intelliSense ;).

This works in OnInspectorGUI for custom inspectors

 `
if (GUI.changed)
{
	EditorUtility.SetDirty (target);
}
` 

If you meant the Update() function that is available with EditorWindow, that seems to be called frame-indepentently.

If you care to be a bit more specific in your question I will edit my answer to be more precise, too. Though I hope that helped you allready.

The functions are not called constantly like they are in play mode.
Update is only called when something in the scene changed.

Link: Unity - Scripting API: ExecuteInEditMode