浏览代码

Merge remote-tracking branch 'internal/master'

/4.0
Tim Mowrer 5 年前
当前提交
17dba16b
共有 23 个文件被更改,包括 1154 次插入284 次删除
  1. 4
      Assets/Scenes/ARCollaborationData/CollaborativeSession.cs
  2. 24
      Assets/Scenes/ARKitCoachingOverlay/ARKitCoachingOverlay.cs
  3. 217
      Assets/Scenes/ARKitCoachingOverlay/ARKitCoachingOverlay.unity
  4. 6
      Assets/Scenes/CameraImage.unity
  5. 8
      Assets/Scenes/FaceTracking/ARCoreFaceRegions.unity
  6. 8
      Assets/Scenes/FaceTracking/ARKitFaceBlendShapes.unity
  7. 152
      Assets/Scenes/FaceTracking/DisplayFaceInfo.cs
  8. 8
      Assets/Scenes/FaceTracking/EyeLasers.unity
  9. 8
      Assets/Scenes/FaceTracking/EyePoses.unity
  10. 103
      Assets/Scenes/FaceTracking/FaceMesh.unity
  11. 8
      Assets/Scenes/FaceTracking/FacePose.unity
  12. 8
      Assets/Scenes/FaceTracking/FixationPoint.unity
  13. 727
      Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity
  14. 2
      Assets/Scenes/FaceTracking/ToggleCameraFacingDirection.cs.meta
  15. 8
      Packages/manifest.json
  16. 2
      ProjectSettings/EditorBuildSettings.asset
  17. 1
      ProjectSettings/GraphicsSettings.asset
  18. 51
      README.md
  19. 41
      Assets/Scenes/FaceTracking/ToggleCameraFacingDirection.cs
  20. 52
      Assets/Scenes/FaceTracking/ToggleManagers.cs
  21. 0
      /Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity.meta
  22. 0
      /Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity
  23. 0
      /Assets/Scenes/FaceTracking/ToggleCameraFacingDirection.cs.meta

4
Assets/Scenes/ARCollaborationData/CollaborativeSession.cs


return;
}
subsystem.collaborationEnabled = true;
subsystem.collaborationRequested = true;
m_MCSession.Enabled = true;
#else
DisableNotSupported("Collaborative sessions are an ARKit 3 feature; This platform does not support them.");

var subsystem = GetSubsystem();
if (subsystem != null)
subsystem.collaborationEnabled = false;
subsystem.collaborationRequested = false;
}
void Update()

24
Assets/Scenes/ARKitCoachingOverlay/ARKitCoachingOverlay.cs


{
if (GetComponent<ARSession>().subsystem is ARKitSessionSubsystem sessionSubsystem)
{
return sessionSubsystem.coachingGoal;
return sessionSubsystem.requestedCoachingGoal;
}
else
{

m_Goal = (CoachingGoal)value;
if (supported && GetComponent<ARSession>().subsystem is ARKitSessionSubsystem sessionSubsystem)
{
sessionSubsystem.coachingGoal = value;
sessionSubsystem.requestedCoachingGoal = value;
}
}
}

#if UNITY_IOS
if (supported && GetComponent<ARSession>().subsystem is ARKitSessionSubsystem sessionSubsystem)
{
sessionSubsystem.coachingGoal = (ARCoachingGoal)m_Goal;
sessionSubsystem.requestedCoachingGoal = (ARCoachingGoal)m_Goal;
sessionSubsystem.coachingActivatesAutomatically = m_ActivatesAutomatically;
}
else

if (supported && GetComponent<ARSession>().subsystem is ARKitSessionSubsystem sessionSubsystem)
{
sessionSubsystem.SetCoachingActive(true, animated ? ARCoachingOverlayTransition.Animated : ARCoachingOverlayTransition.Instant);
}
else
#endif
{
throw new NotSupportedException("ARCoachingOverlay is not supported");
}
}
/// <summary>
/// Disables the [ARCoachingGoal](https://developer.apple.com/documentation/arkit/arcoachinggoal)
/// </summary>
/// <param name="animated">If <c>true</c>, the coaching overlay is animated, e.g. fades out. If <c>false</c>, the coaching overlay disappears instantly, without any transition.</param>
public void DisableCoaching(bool animated)
{
#if UNITY_IOS
if (supported && GetComponent<ARSession>().subsystem is ARKitSessionSubsystem sessionSubsystem)
{
sessionSubsystem.SetCoachingActive(false, animated ? ARCoachingOverlayTransition.Animated : ARCoachingOverlayTransition.Instant);
}
else
#endif

217
Assets/Scenes/ARKitCoachingOverlay/ARKitCoachingOverlay.unity


m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 791307474}
- {fileID: 1550884487}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 1
--- !u!114 &821026228
MonoBehaviour:
m_ObjectHideFlags: 0

m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 2
--- !u!4 &860547061
Transform:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
m_Goal: 3
m_ActivatesAutomatically: 1
m_ActivatesAutomatically: 0
--- !u!1 &1270793018
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &1309688135
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1309688136}
- component: {fileID: 1309688138}
- component: {fileID: 1309688137}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1309688136
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309688135}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1550884487}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1309688137
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309688135}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 4
m_MaxSize: 50
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Disable Coaching
--- !u!222 &1309688138
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309688135}
m_CullTransparentMesh: 0
--- !u!1 &1550884486
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1550884487}
- component: {fileID: 1550884490}
- component: {fileID: 1550884489}
- component: {fileID: 1550884488}
m_Layer: 5
m_Name: Disable Coaching
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1550884487
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1550884486}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1309688136}
m_Father: {fileID: 767025049}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -400, y: 0}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1550884488
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1550884486}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1550884489}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 860547062}
m_MethodName: DisableCoaching
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
--- !u!114 &1550884489
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1550884486}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1550884490
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1550884486}
m_CullTransparentMesh: 0
--- !u!1 &1629170177
GameObject:
m_ObjectHideFlags: 0

6
Assets/Scenes/CameraImage.unity


m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 737.3, y: 120}
m_SizeDelta: {x: 1024, y: 120}
m_Pivot: {x: 0, y: 0}
--- !u!114 &642201224
MonoBehaviour:

m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 60
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3

m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 60
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3

8
Assets/Scenes/FaceTracking/ARCoreFaceRegions.unity


m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!114 &1178163814
MonoBehaviour:
m_ObjectHideFlags: 0

m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!4 &1416175871
Transform:
m_ObjectHideFlags: 0

8
Assets/Scenes/FaceTracking/ARKitFaceBlendShapes.unity


m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!4 &208234941
Transform:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!1 &406902928
GameObject:
m_ObjectHideFlags: 0

152
Assets/Scenes/FaceTracking/DisplayFaceInfo.cs


using System.Collections;
using System.Collections.Generic;
using System.Text;
using Unity.Collections;
using UnityEngine.XR.ARSubsystems;
[RequireComponent(typeof(ARSession))]
[RequireComponent(typeof(ARSessionOrigin))]
public class DisplayFaceInfo : MonoBehaviour
{
[SerializeField]

{
get { return m_FaceInfoText; }
set { m_FaceInfoText = value; }
get => m_FaceInfoText;
set => m_FaceInfoText = value;
[SerializeField]
Text m_InstructionsText;
public Text instructionsText
{
get => m_InstructionsText;
set => m_InstructionsText = value;
}
[SerializeField]
GameObject m_NotSupportedElement;
public GameObject notSupportedElement
{
get => m_NotSupportedElement;
set => m_NotSupportedElement = value;
}
[SerializeField]
[Tooltip("An object whose rotation will be set according to the tracked face.")]
Transform m_FaceControlledObject;
public Transform faceControlledObject
{
get => m_FaceControlledObject;
set => m_FaceControlledObject = value;
}
ARSession m_Session;
ARCameraManager m_CameraManager;
StringBuilder m_Info = new StringBuilder();
bool m_FaceTrackingSupported;
bool m_FaceTrackingWithWorldCameraSupported;
m_Session = GetComponent<ARSession>();
m_CameraManager = GetComponent<ARSessionOrigin>().camera?.GetComponent<ARCameraManager>();
}
void OnEnable()
{
Application.onBeforeRender += OnBeforeRender;
// Detect face tracking with world-facing camera support
var subsystem = m_Session?.subsystem;
if (subsystem != null)
{
var configs = subsystem.GetConfigurationDescriptors(Allocator.Temp);
if (configs.IsCreated)
{
using (configs)
{
foreach (var config in configs)
{
if (config.capabilities.All(Feature.FaceTracking))
{
m_FaceTrackingSupported = true;
}
if (config.capabilities.All(Feature.WorldFacingCamera | Feature.FaceTracking))
{
m_FaceTrackingWithWorldCameraSupported = true;
}
}
}
}
}
}
void OnDisable()
{
Application.onBeforeRender -= OnBeforeRender;
}
void OnBeforeRender()
{
if (m_FaceControlledObject == null)
return;
foreach (var face in m_FaceManager.trackables)
{
if (face.trackingState == TrackingState.Tracking)
{
m_FaceControlledObject.transform.rotation = face.transform.rotation;
var camera = m_CameraManager.GetComponent<Camera>();
m_FaceControlledObject.transform.position = camera.transform.position + camera.transform.forward * 0.5f;
}
}
if (m_FaceManager.subsystem != null && faceInfoText != null)
m_Info.Clear();
if (m_FaceManager.subsystem != null)
faceInfoText.text = $"Supported number of tracked faces: {m_FaceManager.supportedFaceCount}\n" +
$"Max number of faces to track: {m_FaceManager.maximumFaceCount}\n" +
$"Number of tracked faces: {m_FaceManager.trackables.count}";
m_Info.Append($"Supported number of tracked faces: {m_FaceManager.supportedFaceCount}\n");
m_Info.Append($"Max number of faces to track: {m_FaceManager.currentMaximumFaceCount}\n");
m_Info.Append($"Number of tracked faces: {m_FaceManager.trackables.count}\n");
}
if (m_CameraManager)
{
m_Info.Append($"Requested camera facing direction: {m_CameraManager.requestedFacingDirection}\n");
m_Info.Append($"Current camera facing direction: {m_CameraManager.currentFacingDirection}\n");
}
m_Info.Append($"Requested tracking mode: {m_Session.requestedTrackingMode}\n");
m_Info.Append($"Current tracking mode: {m_Session.currentTrackingMode}\n");
if (!m_FaceTrackingSupported)
{
if (m_InstructionsText)
{
m_InstructionsText.text = "Face tracking is not supported.\n";
}
else
{
m_Info.Append("Face tracking is not supported.\n");
}
}
else if (m_CameraManager.requestedFacingDirection == CameraFacingDirection.World && !m_FaceTrackingWithWorldCameraSupported)
{
m_Info.Append("Face tracking in world facing camera mode is not supported.\n");
}
if (m_FaceControlledObject)
{
m_FaceControlledObject.gameObject.SetActive(m_CameraManager.currentFacingDirection == CameraFacingDirection.World);
}
if (m_NotSupportedElement)
{
m_NotSupportedElement.SetActive(m_CameraManager.requestedFacingDirection == CameraFacingDirection.World && !m_FaceTrackingWithWorldCameraSupported);
}
if (m_FaceInfoText)
{
m_FaceInfoText.text = m_Info.ToString();
}
}
}

8
Assets/Scenes/FaceTracking/EyeLasers.unity


m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!4 &208234941
Transform:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!1 &406902928
GameObject:
m_ObjectHideFlags: 0

8
Assets/Scenes/FaceTracking/EyePoses.unity


m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!4 &208234941
Transform:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!1 &406902928
GameObject:
m_ObjectHideFlags: 0

103
Assets/Scenes/FaceTracking/FaceMesh.unity


m_Children:
- {fileID: 249888566}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &208234939
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 208234941}
- component: {fileID: 208234940}
- component: {fileID: 208234943}
m_Layer: 0
m_Name: AR Session
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &208234940
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 208234939}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3859a92a05d4f5d418cb6ca605290e74, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
--- !u!4 &208234941
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 208234939}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 3
--- !u!114 &208234943
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 208234939}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fa850fbd5b8aded44846f96e35f1a9f5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &249888565
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!1 &406902928
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 406902931}
- component: {fileID: 406902930}
- component: {fileID: 406902929}
- component: {fileID: 406902934}
- component: {fileID: 406902933}
- component: {fileID: 406902932}
m_Layer: 0
m_Name: AR Session Origin

m_Children:
- {fileID: 282840814}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &406902932
MonoBehaviour:

m_Name:
m_EditorClassIdentifier:
m_FaceInfoText: {fileID: 249888567}
m_InstructionsText: {fileID: 0}
m_NotSupportedElement: {fileID: 0}
m_FaceControlledObject: {fileID: 0}
--- !u!114 &406902933
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 406902928}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fa850fbd5b8aded44846f96e35f1a9f5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &406902934
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 406902928}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3859a92a05d4f5d418cb6ca605290e74, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!1 &1526980365
GameObject:
m_ObjectHideFlags: 0

8
Assets/Scenes/FaceTracking/FacePose.unity


m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!4 &208234941
Transform:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!1 &406902928
GameObject:
m_ObjectHideFlags: 0

8
Assets/Scenes/FaceTracking/FixationPoint.unity


m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!4 &208234941
Transform:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!1 &406902928
GameObject:
m_ObjectHideFlags: 0

727
Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity


m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 249888566}
- {fileID: 444253638}
- {fileID: 644193000}
- {fileID: 985133550}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
--- !u!1 &208234939
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 208234941}
- component: {fileID: 208234940}
- component: {fileID: 208234943}
m_Layer: 0
m_Name: AR Session
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &208234940
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 208234939}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3859a92a05d4f5d418cb6ca605290e74, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
--- !u!4 &208234941
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 208234939}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &208234943
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 208234939}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fa850fbd5b8aded44846f96e35f1a9f5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &249888565
GameObject:
m_ObjectHideFlags: 0

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -32, y: -32}
m_AnchoredPosition: {x: -32, y: -128}
m_SizeDelta: {x: 725.86, y: 1024}
m_Pivot: {x: 1, y: 1}
--- !u!114 &249888567

m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 2
--- !u!1 &395546000
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 395546001}
- component: {fileID: 395546004}
- component: {fileID: 395546003}
- component: {fileID: 395546002}
m_Layer: 0
m_Name: Z Axis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &395546001
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 395546000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 1}
m_LocalScale: {x: 0.1, y: 0.1, z: 1}
m_Children: []
m_Father: {fileID: 1599536921}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &395546002
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 395546000}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &395546003
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 395546000}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d80c1a202911a4a37a3da59992876dfc, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &395546004
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 395546000}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &406902928
GameObject:
m_ObjectHideFlags: 0

serializedVersion: 6
m_Component:
- component: {fileID: 406902931}
- component: {fileID: 406902934}
- component: {fileID: 406902934}
- component: {fileID: 406902935}
m_Layer: 0
m_Name: AR Session Origin
m_TagString: Untagged

m_Children:
- {fileID: 282840814}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &406902932
MonoBehaviour:

m_Name:
m_EditorClassIdentifier:
m_FaceInfoText: {fileID: 249888567}
m_InstructionsText: {fileID: 425493005}
m_NotSupportedElement: {fileID: 985133549}
m_FaceControlledObject: {fileID: 1599536921}
--- !u!114 &406902933
MonoBehaviour:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 406902928}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e1760703bbd54c04488a8d10600262ab, type: 3}
m_Script: {fileID: 11500000, guid: fa850fbd5b8aded44846f96e35f1a9f5, type: 3}
m_PlanePrefab: {fileID: 1568414836858200, guid: f0e0be81472ff1243aa2afa27e5d0e61,
type: 3}
m_DetectionMode: -1
--- !u!114 &406902934
MonoBehaviour:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 406902928}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 79c03e9e9918e48e08e80457bbf530ac, type: 3}
m_Script: {fileID: 11500000, guid: 3859a92a05d4f5d418cb6ca605290e74, type: 3}
m_PlaneManager: 1
m_FaceManager: 0
--- !u!1 &444253637
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 0
--- !u!114 &406902935
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 406902928}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 85645ea6d9a984404b0688b24fb2a0a7, type: 3}
m_Name:
m_EditorClassIdentifier:
m_CameraManager: {fileID: 282840816}
m_Session: {fileID: 406902934}
--- !u!1 &425493003
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 444253638}
- component: {fileID: 444253640}
- component: {fileID: 444253639}
- component: {fileID: 425493004}
- component: {fileID: 425493006}
- component: {fileID: 425493005}
m_Name: Log
m_Name: Instructions Text
--- !u!224 &444253638
--- !u!224 &425493004
m_GameObject: {fileID: 444253637}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_GameObject: {fileID: 425493003}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_Father: {fileID: 644193000}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1024, y: 128}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &425493005
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 425493003}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 5
m_MaxSize: 50
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Tap screen to switch cameras
--- !u!222 &425493006
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 425493003}
m_CullTransparentMesh: 0
--- !u!1 &644192999
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 644193000}
- component: {fileID: 644193002}
- component: {fileID: 644193001}
m_Layer: 5
m_Name: Instructions
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &644193000
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 644192999}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 425493004}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 32, y: -32}
m_SizeDelta: {x: 1166, y: 1755.3}
m_Pivot: {x: 0, y: 1}
--- !u!114 &444253639
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 128}
m_SizeDelta: {x: 1024, y: 128}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &644193001
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 644192999}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.5019608}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &644193002
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 644192999}
m_CullTransparentMesh: 0
--- !u!1 &664064274
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 664064275}
- component: {fileID: 664064278}
- component: {fileID: 664064277}
- component: {fileID: 664064276}
m_Layer: 0
m_Name: Y Axis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &664064275
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 664064274}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalScale: {x: 0.1, y: 1, z: 0.1}
m_Children: []
m_Father: {fileID: 1599536921}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &664064276
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 664064274}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &664064277
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 664064274}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: e62de97909a2840f786ce710f802cf2d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &664064278
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 664064274}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &899184065
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 899184066}
- component: {fileID: 899184068}
- component: {fileID: 899184067}
m_Layer: 5
m_Name: NotSupported Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &899184066
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 899184065}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 985133550}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1024, y: 128}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &899184067
m_GameObject: {fileID: 444253637}
m_GameObject: {fileID: 899184065}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}

m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontSize: 35
m_MaxSize: 40
m_Alignment: 0
m_MaxSize: 50
m_Alignment: 4
m_Text: Log
--- !u!222 &444253640
m_Text: Face tracking in world facing camera mode is not supported.
--- !u!222 &899184068
m_GameObject: {fileID: 444253637}
m_GameObject: {fileID: 899184065}
--- !u!1 &858637694
--- !u!1 &985133549
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 858637696}
- component: {fileID: 858637695}
m_Layer: 0
m_Name: Logging
- component: {fileID: 985133550}
- component: {fileID: 985133552}
- component: {fileID: 985133551}
m_Layer: 5
m_Name: NotSupportedMsg
m_IsActive: 1
--- !u!114 &858637695
m_IsActive: 0
--- !u!224 &985133550
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 985133549}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 899184066}
m_Father: {fileID: 10187378}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 266}
m_SizeDelta: {x: 1024, y: 128}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &985133551
m_GameObject: {fileID: 858637694}
m_GameObject: {fileID: 985133549}
m_Script: {fileID: 11500000, guid: 6b9ec441ecd1d4c21b5736659749bcf2, type: 3}
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_LogText: {fileID: 444253639}
m_VisibleMessageCount: 40
--- !u!4 &858637696
m_Material: {fileID: 0}
m_Color: {r: 0.88235295, g: 0, b: 0.050980393, a: 0.5019608}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &985133552
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 985133549}
m_CullTransparentMesh: 0
--- !u!1 &1458507118
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1458507119}
- component: {fileID: 1458507122}
- component: {fileID: 1458507121}
- component: {fileID: 1458507120}
m_Layer: 0
m_Name: X Axis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1458507119
m_GameObject: {fileID: 858637694}
m_GameObject: {fileID: 1458507118}
m_LocalPosition: {x: 578, y: 1171, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalPosition: {x: 1, y: 0, z: 0}
m_LocalScale: {x: 1, y: 0.1, z: 0.1}
m_Father: {fileID: 0}
m_RootOrder: 5
m_Father: {fileID: 1599536921}
m_RootOrder: 0
--- !u!65 &1458507120
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1458507118}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1458507121
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1458507118}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 1d85e66239f5b41eb87246c413157610, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1458507122
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1458507118}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1526980365
GameObject:
m_ObjectHideFlags: 0

m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 1e-45, y: 2.28e-43, z: 0, w: -1.7066608e-22}
m_BoundingSphereOverride: {x: 1e-45, y: 2.06e-43, z: 0, w: 11257896}
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0

m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &1599536917
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1599536921}
- component: {fileID: 1599536920}
- component: {fileID: 1599536919}
m_Layer: 0
m_Name: FaceControlledCube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1599536919
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599536917}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1599536920
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599536917}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1599536921
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599536917}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.7}
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
m_Children:
- {fileID: 1458507119}
- {fileID: 664064275}
- {fileID: 395546001}
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

2
Assets/Scenes/FaceTracking/ToggleCameraFacingDirection.cs.meta


fileFormatVersion: 2
guid: 79c03e9e9918e48e08e80457bbf530ac
guid: 85645ea6d9a984404b0688b24fb2a0a7
MonoImporter:
externalObjects: {}
serializedVersion: 2

8
Packages/manifest.json


"com.unity.test-framework": "1.1.11",
"com.unity.textmeshpro": "2.0.1",
"com.unity.ugui": "1.0.0",
"com.unity.xr.arcore": "3.1.0-preview.8",
"com.unity.xr.arfoundation": "3.1.0-preview.8",
"com.unity.xr.arkit": "3.1.0-preview.8",
"com.unity.xr.arkit-face-tracking": "3.1.0-preview.8",
"com.unity.xr.arcore": "4.0.0-preview.1",
"com.unity.xr.arfoundation": "4.0.0-preview.1",
"com.unity.xr.arkit": "4.0.0-preview.1",
"com.unity.xr.arkit-face-tracking": "4.0.0-preview.1",
"com.unity.xr.legacyinputhelpers": "2.0.8",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",

2
ProjectSettings/EditorBuildSettings.asset


path: Assets/Scenes/FaceTracking/FixationPoint.unity
guid: b0bf27dc892684a049959459ba5e6f8f
- enabled: 0
path: Assets/Scenes/FaceTracking/RearCameraWithFrontCameraFaceMesh.unity
path: Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity
guid: ecea31d2ea5464e52bedb91fa1fcb6bb
- enabled: 0
path: Assets/Scenes/HumanSegmentation/HumanBodyTracking2D.unity

1
ProjectSettings/GraphicsSettings.asset


- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}

51
README.md


# AR Foundation Samples
Example projects that use [*AR Foundation 3.1*](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.1/manual/index.html) and demonstrate its functionality with sample assets and components.
Example projects that use [*AR Foundation 4.0*](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.0/manual/index.html) and demonstrate its functionality with sample assets and components.
* ARSubsystems ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@3.1/manual/index.html))
* ARCore XR Plugin ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arcore@3.1/manual/index.html))
* ARKit XR Plugin ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arkit@3.1/manual/index.html))
* ARKit Face Tracking ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arkit-face-tracking@3.1/manual/index.html))
* ARFoundation ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.1/manual/index.html))
* ARSubsystems ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.0/manual/index.html))
* ARCore XR Plugin ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arcore@4.0/manual/index.html))
* ARKit XR Plugin ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arkit@4.0/manual/index.html))
* ARKit Face Tracking ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arkit-face-tracking@4.0/manual/index.html))
* ARFoundation ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.0/manual/index.html))
ARSubsystems defines an interface, and the platform-specific implementations are in the ARCore and ARKit packages. ARFoundation turns the AR data provided by ARSubsystems into Unity `GameObject`s and `MonoBehavour`s.
## Why version should I use?
The `master` branch is compatible with Unity 2019.2 and later. For 2018.4, see the [1.5-preview branch](https://github.com/Unity-Technologies/arfoundation-samples/tree/1.5-preview).
A Unity package is either "Preview" or "Verified". The latest version of ARFoundation is usually marked as preview and may include experimental or unstable features. A "verified" package is developed targeting a specific version of Unity (though it may work with earlier version as well). All packages verified for the same version of Unity are known to work well together.
In ARFoundation, this means:
| Unity Version | ARFoundation Version |
| ------------- | -------------------- |
| 2018.4 | [1.5 (preview)](https://github.com/Unity-Technologies/arfoundation-samples/tree/1.5-preview) |
| 2019.3 | [2.1 (verified)](https://github.com/Unity-Technologies/arfoundation-samples/tree/2.1) |
| 2020.1 | 3.0 (verified) |
| 2020.2 | 4.0 (preview) |
## Why is ARKit Face Tracking a separate package?
## ARSubsystems
For privacy reasons, use of ARKit's face tracking feature requires additional validation in order to publish your app on the App Store. If your application binary contains certain face tracking related symbols, your app may fail validation. For this reason, we provide this feature as a separate package which must be explicitly included.
ARFoundation is built on "[subsystems](https://docs.unity3d.com/2019.3/Documentation/ScriptReference/Subsystem.html)" and depends on a separate package called [ARSubsystems](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.0/manual/index.html). ARSubsystems defines an interface, and the platform-specific implementations are in the [ARCore](https://docs.unity3d.com/Packages/com.unity.xr.arcore@4.0/manual/index.html) and [ARKit](https://docs.unity3d.com/Packages/com.unity.xr.arkit@4.0/manual/index.html) packages. ARFoundation turns the AR data provided by ARSubsystems into Unity `GameObject`s and `MonoBehavour`s.
## ARKit 3 Support
The `master` branch is compatible with Unity 2019.3 and later. For 2018.4, see the [1.5-preview branch](https://github.com/Unity-Technologies/arfoundation-samples/tree/1.5-preview).
The ARKit XR Plugin and ARKit Face Tacking packages support both ARKit 2 and ARKit 3 simultaneously. We supply separate libraries and select the appropriate one based on the version of Xcode selected in your Build Settings. This should eliminate the confusion over which package version is compatible with which Xcode version.
## Why is ARKit Face Tracking a separate package?
The ARKit 3 features require Xcode 11 and iOS/iPadOS 13.
For privacy reasons, use of ARKit's face tracking feature requires additional validation in order to publish your app on the App Store. If your application binary contains certain face tracking related symbols, your app may fail validation. For this reason, we provide this feature as a separate package which must be explicitly included.
1. Download the latest version of Unity 2019.2 or later.
1. Download the latest version of Unity 2019.3 or later.
4. See the [AR Foundation Documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@latest?preview=1) for usage instructions and more information.
4. See the [AR Foundation Documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.0/manual/index.html) for usage instructions and more information.
# Samples

## ImageTracking
This sample demonstrates image tracking. Image tracking is supported on ARCore and ARKit. To enable image tracking, you must first create an `XRReferenceImageLibrary`. This is the set of images to look for in the environment. [Click here](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@3.1/manual/image-tracking.html) for instructions on creating one.
This sample demonstrates image tracking. Image tracking is supported on ARCore and ARKit. To enable image tracking, you must first create an `XRReferenceImageLibrary`. This is the set of images to look for in the environment. [Click here](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.0/manual/image-tracking.html) for instructions on creating one.
At runtime, ARFoundation will generate an `ARTrackedImage` for each detected reference image. This sample uses the [`TrackedImageInfoManager.cs`](https://github.com/Unity-Technologies/arfoundation-samples/blob/master/Assets/Scenes/ImageTracking/TrackedImageInfoManager.cs) script to overlay the original image on top of the detected image, along with some meta data.

Similar to the image tracking sample, this sample detects a 3D object from a set of reference objects in an `XRReferenceObjectLibrary`. [Click here](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@3.1/manual/object-tracking.html) for instructions on creating one.
Similar to the image tracking sample, this sample detects a 3D object from a set of reference objects in an `XRReferenceObjectLibrary`. [Click here](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.0/manual/object-tracking.html) for instructions on creating one.
To use this sample, you must have a physical object the device can recognize. The sample's reference object library is built using two reference objects. The sample includes [printable templates](https://github.com/Unity-Technologies/arfoundation-samples/tree/master/Assets/Scenes/Object%20Tracking/Printable%20Templates) which can be printed on 8.5x11 inch paper and folded into a cube and cylinder.

This sample uses the front-facing (i.e., selfie) camera and requires an iOS device with a TrueDepth camera.
### RearCameraWithFrontCameraFaceMesh
### WorldCameraWithUserFacingFaceTracking
iOS 13 adds support for face tracking while the rear camera is active. This sample does not show much other than number of currently tracked faces. To enable this mode in ARFoundation, you must enable both an `ARFaceManager` and at least one other manager which requires the rear camera. This sample enables both the `ARFaceManager` and `ARPlaneManager` to achieve this.
iOS 13 adds support for face tracking while the world-facing (i.e., rear) camera is active. This means the user-facing (i.e., front) camera is used for face tracking, but the pass through video uses the world-facing camera. To enable this mode in ARFoundation, you must enable an `ARFaceManager`, set the `ARSession` tracking mode to "Position and Rotation" or "Don't Care", and set the `ARCameraManager`'s facing direction to "World". Tap the screen to toggle between the user-facing and world-facing cameras.
The sample code in `DisplayFaceInfo.OnEnable` shows how to detect support for these face tracking features.
When using the world-facing camera, a cube is displayed in front of the camera whose orientation is driven by the face in front of the user-facing camera.
This feature requires a device with a TrueDepth camera and an A12 bionic chip running iOS 13.

41
Assets/Scenes/FaceTracking/ToggleCameraFacingDirection.cs


using UnityEngine;
using UnityEngine.XR.ARFoundation;
public class ToggleCameraFacingDirection : MonoBehaviour
{
[SerializeField]
ARCameraManager m_CameraManager;
public ARCameraManager cameraManager
{
get => m_CameraManager;
set => m_CameraManager = value;
}
[SerializeField]
ARSession m_Session;
public ARSession session
{
get => m_Session;
set => m_Session = value;
}
void Update()
{
if (m_CameraManager == null || m_Session == null)
return;
if (Input.touchCount > 0 && Input.touches[0].phase == TouchPhase.Began)
{
if (m_CameraManager.requestedFacingDirection == CameraFacingDirection.User)
{
m_CameraManager.requestedFacingDirection = CameraFacingDirection.World;
}
else
{
m_CameraManager.requestedFacingDirection = CameraFacingDirection.User;
}
}
}
}

52
Assets/Scenes/FaceTracking/ToggleManagers.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
public class ToggleManagers : MonoBehaviour
{
[SerializeField]
public bool m_PlaneManager;
public bool planeManager
{
get { return m_PlaneManager; }
set { m_PlaneManager = value; }
}
[SerializeField]
public bool m_FaceManager;
public bool faceManager
{
get { return m_FaceManager; }
set { m_FaceManager = value; }
}
void ToggleComponent<T>() where T : MonoBehaviour
{
var behaviour = GetComponent<T>();
if (behaviour == null)
return;
behaviour.enabled = !behaviour.enabled;
var enabledText = behaviour.enabled ? "enabled" : "disabled";
Logger.Log($"{typeof(T).Name} {enabledText}");
}
void Update()
{
if (Input.touchCount < 1)
return;
var touch = Input.touches[0];
if (touch.phase == TouchPhase.Began)
{
if (planeManager)
ToggleComponent<ARPlaneManager>();
if (faceManager)
ToggleComponent<ARFaceManager>();
}
}
}

/Assets/Scenes/FaceTracking/RearCameraWithFrontCameraFaceMesh.unity.meta → /Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity.meta

/Assets/Scenes/FaceTracking/RearCameraWithFrontCameraFaceMesh.unity → /Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity

/Assets/Scenes/FaceTracking/ToggleManagers.cs.meta → /Assets/Scenes/FaceTracking/ToggleCameraFacingDirection.cs.meta

正在加载...
取消
保存