using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.ARSubsystems;
namespace UnityEngine.XR.ARFoundation.Samples
{
///
/// Visualizes the eye gaze position in face space for an .
///
///
/// Face space is the space where the origin is the transform of an .
///
[RequireComponent(typeof(ARFace))]
public class FixationPoint2DVisualizer : MonoBehaviour
{
[SerializeField]
GameObject m_GUIFixationReticlePrefab;
public GameObject fixationReticlePrefab
{
get => m_GUIFixationReticlePrefab;
set => m_GUIFixationReticlePrefab = value;
}
GameObject m_FixationReticleGameObject;
Canvas m_Canvas;
ARFace m_Face;
XRFaceSubsystem m_FaceSubsystem;
void Awake()
{
m_Face = GetComponent();
}
void CreateEyeGameObjectsIfNecessary()
{
var canvas = FindObjectOfType