﻿using System.Collections.Generic;
using UnityEditor;

namespace JLGames.RocketDriver.Editor.Infra
{
    public static class EditorSceneUtil
    {
        /// <summary>
        /// Take all enabled scenes in the Unity project
        /// 取Untiy工程中的全部启用场景
        /// </summary>
        /// <returns></returns>
        public static string[] GetBuildScenes()
        {
            var list = new List<string>();
            foreach (var scene in EditorBuildSettings.scenes)
            {
                if (scene.enabled)
                {
                    list.Add(scene.path);
                }
            }

            return list.ToArray();
        }
    }
}