ReadScenes() public static method

Reads in the current list of scenes registered in the custom TextScene buildsettings.
public static ReadScenes ( ) : List
return List
コード例 #1
0
ファイル: TextScene.cs プロジェクト: tianyt/UnityTextScene
    public TextSceneBuilder(string buildPath, BuildTarget buildTarget, List <string> sceneList)
    {
        if (sceneList == null)
        {
            sceneList = TextScene.ReadScenes();
        }

        if (sceneList.Count == 0)
        {
            EditorUtility.DisplayDialog("No scenes", "No scenes have been added to the build settings. Please add some, and try to build again.", "OK");
            return;
        }

        this.sceneQueue  = new Queue <string>(sceneList);
        this.sceneToLoad = TextSceneMonitor.Instance.GetCurrentScene();
        this.buildPath   = buildPath;
        this.buildTarget = buildTarget;

        if (EditorApplication.SaveCurrentSceneIfUserWantsTo())
        {
            TextSceneMonitor.Instance.SaveIfTempIsNewer();
        }
        else
        {
            Debug.Log("Cancelled build");
            return;
        }

        BuildNext();
    }
コード例 #2
0
    void LoadSettings()
    {
        scenes = TextScene.ReadScenes();

        loadedBuildSettingsTime = TextScene.BuildSettingsDate();
    }