浏览代码

Merge pull request #46 from unity/standalone-update

Use manager type's descriptor property instead of calling through to subsystem for the same thing (adapt to new set of base classes in trunk)
/4.1
GitHub Enterprise 5 年前
当前提交
e19b6ae8
共有 4 个文件被更改,包括 4 次插入4 次删除
  1. 2
      Assets/Scripts/EyePoseVisualizer.cs
  2. 2
      Assets/Scripts/EyeTrackingUI.cs
  3. 2
      Assets/Scripts/FixationPoint2DVisualizer.cs
  4. 2
      Assets/Scripts/FixationPoint3DVisualizer.cs

2
Assets/Scripts/EyePoseVisualizer.cs


void OnEnable()
{
var faceManager = FindObjectOfType<ARFaceManager>();
if (faceManager != null && faceManager.subsystem != null && faceManager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (faceManager != null && faceManager.subsystem != null && faceManager.descriptor.supportsEyeTracking)
{
m_FaceSubsystem = (XRFaceSubsystem)faceManager.subsystem;
SetVisible((m_Face.trackingState == TrackingState.Tracking) && (ARSession.state > ARSessionState.Ready));

2
Assets/Scripts/EyeTrackingUI.cs


{
m_Manager = FindObjectOfType<ARFaceManager>();
}
if (m_Manager != null && m_Manager.subsystem != null && m_Manager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (m_Manager != null && m_Manager.subsystem != null && m_Manager.descriptor.supportsEyeTracking)
{
var infoGO = GetComponent<Text>();
infoGO.text = "This device supports eye tracking.";

2
Assets/Scripts/FixationPoint2DVisualizer.cs


void OnEnable()
{
var faceManager = FindObjectOfType<ARFaceManager>();
if (faceManager != null && faceManager.subsystem != null && faceManager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (faceManager != null && faceManager.subsystem != null && faceManager.descriptor.supportsEyeTracking)
{
m_FaceSubsystem = (XRFaceSubsystem)faceManager.subsystem;
SetVisible((m_Face.trackingState == TrackingState.Tracking) && (ARSession.state > ARSessionState.Ready));

2
Assets/Scripts/FixationPoint3DVisualizer.cs


void OnEnable()
{
var faceManager = FindObjectOfType<ARFaceManager>();
if (faceManager != null && faceManager.subsystem != null && faceManager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (faceManager != null && faceManager.subsystem != null && faceManager.descriptor.supportsEyeTracking)
{
m_FaceSubsystem = (XRFaceSubsystem)faceManager.subsystem;
m_Face.updated += OnUpdated;

正在加载...
取消
保存