15 lines
317 B
C#
15 lines
317 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class NewSceneTrigger : MonoBehaviour
|
|
{
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.gameObject.CompareTag("Player"))
|
|
{
|
|
SceneManager.LoadScene(2);
|
|
Debug.Log("Loaded new scene");
|
|
}
|
|
}
|
|
}
|