18 lines
342 B
C#
Raw Permalink Normal View History

2025-01-17 13:10:20 +01:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Exit : MonoBehaviour
{
public int nextLevel;
private void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
SceneManager.LoadScene(nextLevel);
}
}
}