Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class SceneLoader : MonoBehaviour
- { //simple scene loading function to load the next scene in hte build
- public void LoadNextScene() {
- int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
- SceneManager.LoadScene(currentSceneIndex+1);
- }
- //enable this one on the play again button to take you back to the start menu
- public void LoadStartScene() {
- SceneManager.LoadScene(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement