// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- using UltimateXR.Devices; using UltimateXR.Extensions.System.Collections; using UnityEngine; namespace UltimateXR.UI { /// /// Gaze pointer that can be added to a camera to enable gaze interaction with user interfaces. /// public class UxrCameraPointer : UxrLaserPointer { #region Inspector Properties/Serialized Fields [SerializeField] private GameObject _crosshair; #endregion #region Unity /// /// Initializes the component. /// protected override void Awake() { if (_crosshair != null) { // Disable crosshair colliders to avoid ray-casting _crosshair.GetComponentsInChildren().ForEach(c => c.enabled = false); } ClickInput = UxrInputButtons.Everything; ShowLaserInput = UxrInputButtons.None; IsInvisible = true; // At the end so that the overriden parameters initialize the UxrLaserPointer component correctly. base.Awake(); } #endregion } }