Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System.IO;
  2. using UnityEditor;
  3. using UnityEngine;
  4.  
  5. public class Test : MonoBehaviour
  6. {
  7.     [ContextMenu("Run")]
  8.     private void Run()
  9.     {
  10.         var scenePaths = Directory.GetFiles(Application.dataPath, "*.unity", SearchOption.AllDirectories);
  11.        
  12.         foreach(var path in scenePaths)
  13.         {
  14.             var unityPath = FileUtil.GetProjectRelativePath(path);
  15.             var unityScene = AssetDatabase.LoadAssetAtPath<SceneAsset>(unityPath);
  16.            
  17.             Debug.Log(unityScene);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement