1.在Event下脚本隐藏Pvr_Input Module,添加自己写的脚本,并赋值button
protected virtual void NingShi(Pvr_UIPointer pointer, List<RaycastResult> results)
{ }
protected virtual void Hover(Pvr_UIPointer pointer, List<RaycastResult> results)
{
NingShi(pointer,results);
}
2.凝视点击脚本
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class ningshi : Pvr_InputModule
{
public GameObject images;
public GameObject buttons;
protected override void NingShi(Pvr_UIPointer pointer, List<RaycastResult> results)
{
foreach (var item in results)
{
if (item.gameObject .name== "ningshiBtn")
{
images.SetActive(true);
buttons.SetActive(false);
}
}
}
}
3.Canvas配置