mirror of
https://github.com/Project-Redacted/project-hampter.git
synced 2025-06-07 03:03:13 +00:00
15 lines
No EOL
367 B
C#
15 lines
No EOL
367 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class LoadNextScene : MonoBehaviour
|
|
{
|
|
public string nextSceneName; // the name of the next scene to load
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.CompareTag("Player"))
|
|
{
|
|
SceneManager.LoadScene(nextSceneName); // load the next scene
|
|
}
|
|
}
|
|
} |