提交场景跳转,修复360视频播放,更新场景播放效果
This commit is contained in:
25
Assets/YOMOV Access/Scripts/HideHandOnGrab.cs
Normal file
25
Assets/YOMOV Access/Scripts/HideHandOnGrab.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
using UnityEngine.XR.Interaction.Toolkit.Interactors;
|
||||
|
||||
public class HideHandOnGrab : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] XRBaseInteractor interactor;
|
||||
[SerializeField] GameObject handModel;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
interactor.selectEntered.AddListener(_ => handModel.SetActive(false));
|
||||
interactor.selectExited.AddListener(_ => handModel.SetActive(true));
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
interactor.selectEntered.RemoveAllListeners();
|
||||
interactor.selectExited.RemoveAllListeners();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user