Newer
Older
HoloAnatomy / Assets / HoloToolkit-Examples / SpatialMapping / Scripts / LevelManager.cs
SURFACEBOOK2\jackwynne on 25 May 2018 615 bytes v1
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine;
using UnityEngine.SceneManagement;

namespace HoloToolkit.Examples
{
    public class LevelManager : MonoBehaviour
    {
        public void LoadNextScene()
        {
            int sceneIndex = SceneManager.GetActiveScene().buildIndex + 1;
            if (sceneIndex >= SceneManager.sceneCountInBuildSettings)
            {
                sceneIndex = 0;
            }

            SceneManager.LoadScene(sceneIndex);
        }
    }
}