Ejemplo n.º 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));
         }
     }
 }
Ejemplo n.º 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));
         }
     }
 }