EditorApplication.isUpdating

static var isUpdating : boolean

Description

Is editor currently updating? (Read Only)

    // Simple editor Script that lets you create a new scene if editor is nmot updating.

import UnityEditor;

@MenuItem("Example/New Scene while not updating")
static function EditorPlaying() {
if(!EditorApplication.isUpdating) {
EditorApplication.NewScene();
}
}