Example #1
0
 private static void DetectSceneDeletion(string[] deletedAssets)
 {
     foreach (string assetPath in deletedAssets)
     {
         if (Path.GetExtension(assetPath) == TypedSceneSettings.SceneExtension &&
             !TypedSceneValidator.ValidateSceneDeletion(Path.GetFileNameWithoutExtension(assetPath)))
         {
             TypedSceneStorage.Delete(Path.GetFileNameWithoutExtension(assetPath));
         }
     }
 }
Example #2
0
 private static void DetectSceneDeletion(string[] deletedAssets)
 {
     foreach (string assetPath in deletedAssets)
     {
         if (Path.GetExtension(assetPath) == TypedSceneSettings.SceneExtension &&
             !TypedSceneValidator.ValidateSceneDeletion(Path.GetFileNameWithoutExtension(assetPath)))
         {
             var newSceneList = new List <EditorBuildSettingsScene>(EditorBuildSettings.scenes);
             newSceneList.RemoveAll(scene => scene.path == assetPath);
             EditorBuildSettings.scenes = newSceneList.ToArray();
             TypedSceneStorage.Delete(Path.GetFileNameWithoutExtension(assetPath));
         }
     }
 }