using Microsoft.MixedReality.Toolkit.Input; using UnityEngine; namespace WebViewStream { public class ConfigurePointer : MonoBehaviour { private bool handRayPointerEnabled = true; /// /// Toggles the hand ray pointer on and off. /// public void ToggleHandRayPointer() { if (handRayPointerEnabled) { DisableHandRayPointer(); handRayPointerEnabled = false; } else { EnableHandRayPointer(); handRayPointerEnabled = true; } } private void EnableHandRayPointer() { PointerUtils.SetHandRayPointerBehavior(PointerBehavior.AlwaysOn); } private void DisableHandRayPointer() { PointerUtils.SetHandRayPointerBehavior(PointerBehavior.AlwaysOff); } } }