/// <summary>
            /// Construct from a Unity SceneSetup
            /// </summary>
            public SceneEntry(UnityEditor.SceneManagement.SceneSetup sceneSetup)
            {
                scene = new AmsSceneReference(sceneSetup.path);

                loadInEditor = sceneSetup.isLoaded;
                loadMethod   = LoadMethod.Additive;
            }
Exemplo n.º 2
0
 public SceneSetup(UnityEditor.SceneManagement.SceneSetup setup, LoadSceneMode mode = LoadSceneMode.Additive)
 {
     IsActive = setup.isActive;
     IsLoaded = setup.isLoaded;
     Mode     = mode;
     Path     = setup.path;
 }
Exemplo n.º 3
0
    public static void RestoreSceneSetup()
    {
        var assetPath = PathsUtility.ConvertFullAbsolutePathToAssetPath(PathsUtility.TryGetSelectedFilePathInProjectsTab());
        var loader    = AssetDatabase.LoadAssetAtPath <MultiSceneSetup>(assetPath);
        var setups    = new UnityEditor.SceneManagement.SceneSetup[loader.Setups.Count];

        for (var i = 0; i < loader.Setups.Count; i++)
        {
            setups[i]          = new UnityEditor.SceneManagement.SceneSetup();
            setups[i].isActive = loader.Setups[i].IsActive;
            setups[i].isLoaded = loader.Setups[i].IsLoaded;
            setups[i].path     = loader.Setups[i].Path;
        }

        EditorSceneManager.RestoreSceneManagerSetup(setups);
    }
 public static extern void RestoreSceneManagerSetup(SceneSetup[] value);