public class sceengogogo : MonoBehaviour
{
private NavMeshAgent Man;
void Awake()
{
}
void Start()
{
Man = GetComponent<NavMeshAgent>();
GameObject btnObj = GameObject.Find("Man");//"Cube"为碰撞体的名称
if()
{
this.OnTriggerEnter();
}
}
// Update is called once per frame
void Update()
{
}
public void OnTriggerEnter(Collider col)
{
if (col.tag == "cube")//碰撞体Cube
{
SceneManager.LoadScene("scene_1");
}
}
}