12 lines
270 B
C#
12 lines
270 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class TriggerLevelChange : MonoBehaviour
|
|
{
|
|
public string levelToLoad;
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.tag == "Player") SceneManager.LoadScene(levelToLoad);
|
|
}
|
|
} |