mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-23 15:54:18 +00:00
16 lines
439 B
C#
16 lines
439 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|