GameJam Progress Day 2
This commit is contained in:
15
Assets/Scripts/UI/LoadSceneOnClick.cs
Normal file
15
Assets/Scripts/UI/LoadSceneOnClick.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class LoadSceneOnClick : MonoBehaviour
|
||||
{
|
||||
public string sceneName;
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
Debug.Log("Load scene: " + this.sceneName);
|
||||
SceneManager.LoadScene(this.sceneName, LoadSceneMode.Single);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user