private void OnDestroy() { if (core != null) { core.SaveCache(); } SavePrefs(); if (searchResult != null && currentPhase == Phase.Complete) { searchResult.RestoreInitialSceneSetup(true); } }
private void OnDestroy() { if (core != null) { core.SaveCache(); } SavePrefs(); if (searchResult != null && currentPhase == Phase.Complete && !EditorApplication.isPlaying && searchResult.IsSceneSetupDifferentThanCurrentSetup()) { if (EditorUtility.DisplayDialog("Scenes", "Restore initial scene setup?", "Yes", "Leave it as is")) { searchResult.RestoreInitialSceneSetup(); } } }