1
Fork 0
mirror of https://github.com/Steffo99/beat-td.git synced 2024-11-23 15:54:18 +00:00
beat-td/Assets/Scripts/LoadSceneOnClick.cs

16 lines
439 B
C#
Raw Normal View History

2018-04-23 08:45:40 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LoadSceneOnClick : MonoBehaviour {
public void Play () {
SceneManager.LoadScene("Game");
Scene menu = SceneManager.GetSceneByName("Menu");
Scene game = SceneManager.GetSceneByName("Game");
SceneManager.SetActiveScene(game);
SceneManager.UnloadSceneAsync(menu);
}
}