UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make scene switch after rigidbody with tag Player reaches a trigger"
using UnityEngine; using UnityEngine.SceneManagement; public class SceneSwitchTrigger : MonoBehaviour { private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { // Replace "NextSceneName" with the name of the scene you want to switch to SceneManager.LoadScene("NextSceneName"); } } }