Sha256: 8ad797cc52b9471d866e54aac50c6c1a4a1c583db4e1e3e36514606d15994852

Contents?: true

Size: 614 Bytes

Versions: 43

Compression:

Stored size: 614 Bytes

Contents

using UnityEditor;
using UnityEngine;
using System.Collections.Generic;

namespace U3d {
  class EditorRun {
    [MenuItem ("U3d/Example/LoadSaveScenes")]
    static void LoadSaveScenes() {
      if(EditorApplication.isPlaying) {
        Debug.LogError("Do not run while playing");
        return;
      }
      IEnumerable<string> scenes = FileSystemUtil.GetFiles("Assets/");
      foreach(string path in scenes) {
        if (path.EndsWith(".unity")) {
          Debug.Log("Loading " + path);
          EditorApplication.OpenScene(path);
          EditorApplication.SaveScene(path);
        }
      }
    }
  }
}

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
u3d-1.3.4 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.3.3 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.3.2 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.3.1 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.3.0 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.2.3 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.2.2 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.2.1 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.2.0 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.1.5 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.1.4 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.1.3 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.1.2 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.1.1 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.1.0 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.0.21 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.0.20 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.0.19 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.0.18 examples/Example1/Assets/Editor/EditorRun.cs
u3d-1.0.17 examples/Example1/Assets/Editor/EditorRun.cs