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