Crossy_Road_VR/Assets/Crossy Road VR/Scripts/ActivateUILineScript.cs
2025-01-25 16:18:02 +03:00

34 lines
747 B
C#

using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
using UnityEngine.XR.Interaction.Toolkit.Filtering;
public class ActivateUILineScript : MonoBehaviour
{
// Start is called before the first frame update
private XRInteractorLineVisual line;
private void Start()
{
line = GetComponent<XRInteractorLineVisual>();
if (line == null )
{
Debug.Log("XRInteractorLineVisual is empty");
}
}
public void OnPointerEnter()
{
line.enabled = true;
//Debug.Log("Point enter");
}
public void OnPointerExit()
{
line.enabled = false;
//Debug.Log("Point exit");
// Например, убрать подсветку
}
}