浏览代码

updated field naming

/4.1
Shan Jiang 4 年前
当前提交
34117262
共有 1 个文件被更改,包括 13 次插入13 次删除
  1. 26
      Assets/Scenes/LightEstimation/FacingDirectionManager.cs

26
Assets/Scenes/LightEstimation/FacingDirectionManager.cs


namespace UnityEngine.XR.ARFoundation.Samples
{
/// <summary>
/// On ARKit, HDR light estimation only works in face tracking mode.
/// On ARCore, HDR light estimation only works when NOT in face tracking mode.
/// This script enables face tracking on iOS and disables it otherwise.
/// This script enables face tracking with user facing camera and disables it otherwise.
/// It enables the world space object with world facing camera and disables it otherwise.
/// </summary>
[RequireComponent(typeof(ARSessionOrigin))]
[RequireComponent(typeof(ARFaceManager))]

[SerializeField]
[SerializeField]
GameObject m_WorldSpaceObject;
public GameObject worldSpaceObject

}
CameraFacingDirection updatedCameraFacingDirection;
CameraFacingDirection originalCameraFacingDirection;
CameraFacingDirection m_CurrentCameraFacingDirection;
ARCameraManager m_CameraManager;
originalCameraFacingDirection = GetComponentInChildren<ARCameraManager>().currentFacingDirection;
updatedCameraFacingDirection = originalCameraFacingDirection;
m_CameraManager = GetComponentInChildren<ARCameraManager>();
m_CurrentCameraFacingDirection = m_CameraManager.currentFacingDirection;
updatedCameraFacingDirection = GetComponentInChildren<ARCameraManager>().currentFacingDirection;
if (updatedCameraFacingDirection != CameraFacingDirection.None && updatedCameraFacingDirection != originalCameraFacingDirection)
var updatedCameraFacingDirection = m_CameraManager.currentFacingDirection;
if (updatedCameraFacingDirection != CameraFacingDirection.None && updatedCameraFacingDirection != m_CurrentCameraFacingDirection)
originalCameraFacingDirection = updatedCameraFacingDirection;
m_CurrentCameraFacingDirection = updatedCameraFacingDirection;
originalCameraFacingDirection = updatedCameraFacingDirection;
m_CurrentCameraFacingDirection = updatedCameraFacingDirection;
GetComponent<ARFaceManager>().enabled = false;
worldSpaceObject.SetActive(true);
Application.onBeforeRender += OnBeforeRender;

}
}
}
}
}
正在加载...
取消
保存