void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Player")
SceneManager.LoadScene (2);
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneScript {
public void ChangeScene(string scene = "") {
SceneManager.LoadScene(sceneName:"scenes Name");
}
}
SceneManager.LoadScene(scenename);