특정 Object에 상호작용시 Scene이동
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.XR.Interaction.Toolkit;
public class SceneChanger : MonoBehaviour
{
public XRSimpleInteractable interactable;
private void Start()
{
interactable.selectEntered.AddListener(OnSelectEntered);
}
private void OnSelectEntered(SelectEnterEventArgs args)
{
Debug.Log("이벤트");
SceneManager.LoadScene("Dev2");
}
}