您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
33 行
724 B
33 行
724 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
public class SceneList : BuildFrontendAssetBase
|
|
{
|
|
[Header("Scene List")]
|
|
public SceneAsset[] Scenes;
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
|
|
if(Scenes == null)
|
|
Scenes = new SceneAsset[0];
|
|
}
|
|
|
|
public string[] scenePaths
|
|
{
|
|
get
|
|
{
|
|
if (Scenes == null) return null;
|
|
var scenes = new List<string>();
|
|
foreach(var scene in Scenes)
|
|
{
|
|
if (scene != null)
|
|
scenes.Add(AssetDatabase.GetAssetPath(scene));
|
|
}
|
|
return scenes.ToArray();
|
|
}
|
|
}
|
|
}
|