SceneMoving.cs 604 Bytes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class SceneMoving : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }

    void OnTriggerEnter(Collider other)
    {
        if (other.transform.name == "rpgpp_lt_tree_pine_01")
        { //충돌한 물체 tag가 Player라면, End 씬으로 씬을 넘긴다. 
            GameObject.Destroy(gameObject);
            SceneManager.LoadScene("IntervalTraining");
        }
    }
}