using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit; // Updated namespace
public class PokePopUp : MonoBehaviour
{
// Reference to your UI pop-up GameObject
public GameObject popUp;
public UnityEngine.XR.Interaction.Toolkit.Interactables.XRSimpleInteractable interactable;
private void Awake()
{
interactable = GetComponent<UnityEngine.XR.Interaction.Toolkit.Interactables.XRSimpleInteractable>();
}
private void OnEnable()
{
interactable.onSelectEntered.AddListener(OnPokeEnter);
}
private void OnDisable()
{
interactable.onSelectEntered.RemoveListener(OnPokeEnter);
}
private void OnPokeEnter(UnityEngine.XR.Interaction.Toolkit.Interactors.XRBaseInteractor interactor)
{
// Show the pop-up on touch
popUp.SetActive(true);
}
}
Currently it says ‘XRBaseInteractable.onSelectEntered’ is obsolete: ‘onSelectEntered has been deprecated. Use selectEntered with updated signature instead.’
I dont quite understand which is the updated signature. ( this is for a UI pop up interaction on poke for my VR project ) I dont know which signature to use for this script.