浏览代码

suggested fixes

/3.1
Alexandra Serralta 5 年前
当前提交
59efa45f
共有 39 个文件被更改,包括 2508 次插入433 次删除
  1. 4
      Assets/Scenes/ARCollaborationData/CollaborativeSession.cs
  2. 24
      Assets/Scenes/ARKitCoachingOverlay/ARKitCoachingOverlay.cs
  3. 216
      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. 1
      Assets/Scenes/FaceTracking/EyeLasers.unity
  9. 8
      Assets/Scenes/FaceTracking/EyePoses.unity
  10. 73
      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. 868
      Assets/Scenes/LightEstimation/LightEstimation.unity
  16. 49
      Assets/Scripts/LightEstimation.cs
  17. 88
      Assets/Scripts/UX/ARSceneSelectUI.cs
  18. 10
      Assets/Scripts/UX/BackButton.cs
  19. 209
      Assets/Scripts/UX/CheckAvailableFeatures.cs
  20. 15
      Assets/Scripts/UX/Tooltip.cs
  21. 12
      Packages/manifest.json
  22. 5
      ProjectSettings/EditorBuildSettings.asset
  23. 56
      ProjectSettings/EditorSettings.asset
  24. 4
      ProjectSettings/GraphicsSettings.asset
  25. 54
      ProjectSettings/ProjectSettings.asset
  26. 4
      ProjectSettings/ProjectVersion.txt
  27. 6
      ProjectSettings/QualitySettings.asset
  28. 53
      README.md
  29. 41
      Assets/Scenes/FaceTracking/ToggleCameraFacingDirection.cs
  30. 49
      Assets/Scenes/LightEstimation/PlatformSelector.cs
  31. 11
      Assets/Scenes/LightEstimation/PlatformSelector.cs.meta
  32. 14
      Assets/Scenes/LightEstimation/Rotator.cs
  33. 11
      Assets/Scenes/LightEstimation/Rotator.cs.meta
  34. 77
      Assets/Scenes/LightEstimation/Shiny.mat
  35. 8
      Assets/Scenes/LightEstimation/Shiny.mat.meta
  36. 52
      Assets/Scenes/FaceTracking/ToggleManagers.cs
  37. 0
      /Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity.meta
  38. 0
      /Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity
  39. 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

216
Assets/Scenes/ARKitCoachingOverlay/ARKitCoachingOverlay.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: 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();
}
}
}

1
Assets/Scenes/FaceTracking/EyeLasers.unity


m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 1
--- !u!4 &208234941
Transform:
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

73
Assets/Scenes/FaceTracking/FaceMesh.unity


- {fileID: 578386341}
- {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:

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_Children:
- {fileID: 65970743}
- {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

868
Assets/Scenes/LightEstimation/LightEstimation.unity


debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &13365791
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 13365792}
- component: {fileID: 13365795}
- component: {fileID: 13365794}
- component: {fileID: 13365793}
m_Layer: 0
m_Name: Forward
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &13365792
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13365791}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.5}
m_LocalScale: {x: 0.1, y: 0.1, z: 1}
m_Children: []
m_Father: {fileID: 787642026}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &13365793
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13365791}
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 &13365794
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13365791}
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 &13365795
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13365791}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &16873457
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 16873458}
- component: {fileID: 16873461}
- component: {fileID: 16873460}
- component: {fileID: 16873459}
m_Layer: 0
m_Name: TipX2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &16873458
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 16873457}
m_LocalRotation: {x: -0.38268343, y: -0, z: -0, w: 0.92387956}
m_LocalPosition: {x: 0, y: 0.15, z: 0}
m_LocalScale: {x: 0.1, y: 0.5, z: 0.10000001}
m_Children: []
m_Father: {fileID: 1315274497}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: -45, y: 0, z: 0}
--- !u!65 &16873459
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 16873457}
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 &16873460
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 16873457}
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 &16873461
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 16873457}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &90891935
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 90891935}
m_CullTransparentMesh: 0
--- !u!1 &179333207
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 179333208}
m_Layer: 0
m_Name: LightDirectionArrow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &179333208
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 179333207}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.9}
m_LocalScale: {x: 0.1, y: 0.1, z: 0.2}
m_Children:
- {fileID: 787642026}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &223678742
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 223678743}
- component: {fileID: 223678746}
- component: {fileID: 223678745}
- component: {fileID: 223678744}
m_Layer: 0
m_Name: TipX2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &223678743
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 223678742}
m_LocalRotation: {x: -0.38268343, y: -0, z: -0, w: 0.92387956}
m_LocalPosition: {x: 0, y: 0.15, z: 0}
m_LocalScale: {x: 0.1, y: 0.5, z: 0.10000001}
m_Children: []
m_Father: {fileID: 1365507342}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: -45, y: 0, z: 0}
--- !u!65 &223678744
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 223678742}
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 &223678745
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 223678742}
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 &223678746
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 223678742}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &282840810
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &427002222
MonoBehaviour:

m_Script: {fileID: 11500000, guid: fa850fbd5b8aded44846f96e35f1a9f5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &436570641
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 436570645}
- component: {fileID: 436570644}
- component: {fileID: 436570643}
- component: {fileID: 436570642}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &436570642
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 436570641}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a7cfdbcf3ec334776ac44c24c8b3e991, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!23 &436570643
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 436570641}
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: d1f734de3fd0c4a2b9b0042435f673df, 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 &436570644
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 436570641}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &436570645
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 436570641}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1029467917}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &606503167
GameObject:
m_ObjectHideFlags: 0

- {fileID: 2012803747}
- {fileID: 305166355}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 652819436}
m_CullTransparentMesh: 0
--- !u!1 &681310807
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 681310808}
m_Layer: 0
m_Name: Tip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &681310808
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 681310807}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 1}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 1315274497}
- {fileID: 1365507342}
m_Father: {fileID: 787642026}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &787642025
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 787642026}
m_Layer: 0
m_Name: Offset
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &787642026
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 787642025}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -0.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 13365792}
- {fileID: 681310808}
m_Father: {fileID: 179333208}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &946481305
GameObject:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
m_CameraManager: {fileID: 282840817}
m_Arrow: {fileID: 179333208}
--- !u!114 &1015722069
MonoBehaviour:
m_ObjectHideFlags: 0

m_MainLightIntensityLumens: {fileID: 1288088591}
m_MainLightColor: {fileID: 2085643643}
m_SphericalHarmonicsText: {fileID: 2012803748}
--- !u!1 &1029467916
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1029467917}
m_Layer: 0
m_Name: WorldSpaceObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1029467917
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1029467916}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
m_Children:
- {fileID: 436570645}
- {fileID: 2115462283}
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1258683822
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1288088589}
m_CullTransparentMesh: 0
--- !u!1 &1315274496
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1315274497}
m_Layer: 0
m_Name: Red tip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1315274497
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1315274496}
m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1729026335}
- {fileID: 16873458}
m_Father: {fileID: 681310808}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
--- !u!1 &1335839533
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 1335839535}
- component: {fileID: 1335839534}
- component: {fileID: 1335839536}
- component: {fileID: 1335839538}
- component: {fileID: 1335839537}
m_Layer: 0
m_Name: AR Session Origin

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

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1335839533}
m_Enabled: 1
m_Enabled: 0
m_Script: {fileID: 11500000, guid: fa17d122634046b4a8e23048891fafc5, type: 3}
m_Script: {fileID: 11500000, guid: caeceacb624484daf8e379c2252fd246, type: 3}
m_FacePrefab: {fileID: 1405894938185170, guid: 92e70fac81673432784c18cf08f10366,
type: 3}
m_MaximumFaceCount: 1
--- !u!114 &1335839537
MonoBehaviour:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 1335839533}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e1760703bbd54c04488a8d10600262ab, type: 3}
m_Script: {fileID: 11500000, guid: 380e2ad9ceb884139a45ff2fd42db8f9, type: 3}
m_PlanePrefab: {fileID: 1585201990951412, guid: d16dd8da7e4ccbe42b1b4a344a72ecbb,
type: 3}
m_DetectionMode: -1
--- !u!114 &1335839538
MonoBehaviour:
m_WorldSpaceObject: {fileID: 1029467916}
--- !u!1 &1365507341
GameObject:
m_GameObject: {fileID: 1335839533}
serializedVersion: 6
m_Component:
- component: {fileID: 1365507342}
m_Layer: 0
m_Name: GreenTip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1365507342
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1365507341}
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: 1422486024}
- {fileID: 223678743}
m_Father: {fileID: 681310808}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1422486023
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1422486024}
- component: {fileID: 1422486027}
- component: {fileID: 1422486026}
- component: {fileID: 1422486025}
m_Layer: 0
m_Name: TipX1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1422486024
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1422486023}
m_LocalRotation: {x: 0.38268343, y: -0, z: -0, w: 0.92387956}
m_LocalPosition: {x: 0, y: -0.15, z: 0}
m_LocalScale: {x: 0.1, y: 0.5, z: 0.10000001}
m_Children: []
m_Father: {fileID: 1365507342}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
--- !u!65 &1422486025
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1422486023}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7d5359d5f13250e4485741ed685a32be, type: 3}
m_Name:
m_EditorClassIdentifier:
m_PlacedPrefab: {fileID: 1237402283603786, guid: 2e80f2e009b5347149ebaae6d96ddfb8,
type: 3}
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1422486026
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1422486023}
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 &1422486027
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1422486023}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1729026334
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1729026335}
- component: {fileID: 1729026338}
- component: {fileID: 1729026337}
- component: {fileID: 1729026336}
m_Layer: 0
m_Name: TipX1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1729026335
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729026334}
m_LocalRotation: {x: 0.38268343, y: -0, z: -0, w: 0.92387956}
m_LocalPosition: {x: 0, y: -0.15, z: 0}
m_LocalScale: {x: 0.1, y: 0.5, z: 0.10000001}
m_Children: []
m_Father: {fileID: 1315274497}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
--- !u!65 &1729026336
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729026334}
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 &1729026337
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729026334}
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 &1729026338
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729026334}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1779915675
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2085643641}
m_CullTransparentMesh: 0
--- !u!1 &2115462282
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2115462283}
- component: {fileID: 2115462286}
- component: {fileID: 2115462285}
- component: {fileID: 2115462284}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2115462283
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2115462282}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1029467917}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!135 &2115462284
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2115462282}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &2115462285
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2115462282}
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: d1f734de3fd0c4a2b9b0042435f673df, 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 &2115462286
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2115462282}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &2146458540
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

49
Assets/Scripts/LightEstimation.cs


[Tooltip("The ARCameraManager which will produce frame events containing light estimation information.")]
ARCameraManager m_CameraManager;
[SerializeField]
Transform m_Arrow;
public Transform arrow
{
get => m_Arrow;
set => m_Arrow = value;
}
/// <summary>
/// Get or set the <c>ARCameraManager</c>.
/// </summary>

{
if (m_CameraManager != null)
m_CameraManager.frameReceived += FrameChanged;
// Disable the arrow to start; enable it later if we get directional light info
arrow?.gameObject.SetActive(false);
Application.onBeforeRender += OnBeforeRender;
Application.onBeforeRender -= OnBeforeRender;
void OnBeforeRender()
{
if (arrow && m_CameraManager)
{
var cameraTransform = m_CameraManager.GetComponent<Camera>().transform;
arrow.position = cameraTransform.position + cameraTransform.forward * .25f;
}
}
void FrameChanged(ARCameraFrameEventArgs args)
{
if (args.lightEstimation.averageBrightness.HasValue)

colorTemperature = args.lightEstimation.averageColorTemperature.Value;
m_Light.colorTemperature = colorTemperature.Value;
}
if (args.lightEstimation.colorCorrection.HasValue)
{
colorCorrection = args.lightEstimation.colorCorrection.Value;

{
mainLightDirection = args.lightEstimation.mainLightDirection;
m_Light.transform.rotation = Quaternion.LookRotation(mainLightDirection.Value);
if (arrow)
{
arrow.gameObject.SetActive(true);
arrow.rotation = Quaternion.LookRotation(mainLightDirection.Value);
}
}
else
{
arrow?.gameObject.SetActive(false);
#if PLATFORM_ANDROID
// ARCore needs to apply energy conservation term (1 / PI) and be placed in gamma
m_Light.color = mainLightColor.Value / Mathf.PI;
m_Light.color = m_Light.color.gamma;
// ARCore returns color in HDR format (can be represented as FP16 and have values above 1.0)
var camera = m_CameraManager.GetComponentInParent<Camera>();
if (camera == null || !camera.allowHDR)
{
Debug.LogWarning($"HDR Rendering is not allowed. Color values returned could be above the maximum representable value.");
}
#endif
m_Light.color = mainLightColor.Value;
}
if (args.lightEstimation.mainLightIntensityLumens.HasValue)

88
Assets/Scripts/UX/ARSceneSelectUI.cs


public class ARSceneSelectUI : MonoBehaviour
{
public GameObject allMenu;
public GameObject faceTrackingMenu;
public GameObject humanSegmentationMenu;
public GameObject lightEstimationMenu;
public GameObject planeDetectionMenu;
[SerializeField]
GameObject m_AllMenu;
public GameObject allMenu
{
get { return m_AllMenu; }
set { m_AllMenu = value; }
}
[SerializeField]
GameObject m_FaceTrackingMenu;
public GameObject faceTrackingMenu
{
get { return m_FaceTrackingMenu; }
set { m_FaceTrackingMenu = value; }
}
[SerializeField]
GameObject m_HumanSegmentationMenu;
public GameObject humanSegmentationMenu
{
get { return m_HumanSegmentationMenu; }
set { m_HumanSegmentationMenu = value; }
}
[SerializeField]
GameObject m_LightEstimationMenu;
public GameObject lightEstimationMenu
{
get { return m_LightEstimationMenu; }
set { m_LightEstimationMenu = value; }
}
[SerializeField]
GameObject m_PlaneDetectionMenu;
public GameObject planeDetectionMenu
{
get { return m_PlaneDetectionMenu; }
set { m_PlaneDetectionMenu = value; }
}
faceTrackingMenu.SetActive(true);
allMenu.SetActive(false);
m_FaceTrackingMenu.SetActive(true);
m_AllMenu.SetActive(false);
planeDetectionMenu.SetActive(true);
allMenu.SetActive(false);
m_PlaneDetectionMenu.SetActive(true);
m_AllMenu.SetActive(false);
humanSegmentationMenu.SetActive(true);
allMenu.SetActive(false);
m_HumanSegmentationMenu.SetActive(true);
m_AllMenu.SetActive(false);
lightEstimationMenu.SetActive(true);
allMenu.SetActive(false);
m_LightEstimationMenu.SetActive(true);
m_AllMenu.SetActive(false);
}
}

public void FaceTrackingMenuButtonPressed()
{
ActiveMenu.currentMenu = MenuType.FaceTracking;
faceTrackingMenu.SetActive(true);
allMenu.SetActive(false);
m_FaceTrackingMenu.SetActive(true);
m_AllMenu.SetActive(false);
}
public void ARCoreFaceRegionsButtonPressed()
{

public void HumanSegmentationMenuButtonPressed()
{
ActiveMenu.currentMenu = MenuType.HumanSegmentation;
humanSegmentationMenu.SetActive(true);
allMenu.SetActive(false);
m_HumanSegmentationMenu.SetActive(true);
m_AllMenu.SetActive(false);
}
public void HumanSegmentation2DButtonPressed()
{

public void LightEstimationMenuButtonPressed()
{
ActiveMenu.currentMenu = MenuType.LightEstimation;
lightEstimationMenu.SetActive(true);
allMenu.SetActive(false);
m_LightEstimationMenu.SetActive(true);
m_AllMenu.SetActive(false);
}
public void ARKitHDRLightEstimationButtonPressed()

public void PlaneDetectionMenuButtonPressed()
{
ActiveMenu.currentMenu = MenuType.PlaneDetection;
planeDetectionMenu.SetActive(true);
allMenu.SetActive(false);
m_PlaneDetectionMenu.SetActive(true);
m_AllMenu.SetActive(false);
}
public void FeatheredPlanesButtonPressed()
{

public void BackButtonPressed()
{
ActiveMenu.currentMenu = MenuType.Main;
faceTrackingMenu.SetActive(false);
planeDetectionMenu.SetActive(false);
humanSegmentationMenu.SetActive(false);
lightEstimationMenu.SetActive(false);
allMenu.SetActive(true);
m_FaceTrackingMenu.SetActive(false);
m_PlaneDetectionMenu.SetActive(false);
m_HumanSegmentationMenu.SetActive(false);
m_LightEstimationMenu.SetActive(false);
m_AllMenu.SetActive(true);
}
}

10
Assets/Scripts/UX/BackButton.cs


public class BackButton : MonoBehaviour
{
public GameObject backButton;
[SerializeField]
GameObject m_BackButton;
public GameObject backButton
{
get { return m_BackButton; }
set { m_BackButton = value; }
}
backButton.SetActive(true);
m_BackButton.SetActive(true);
}
}

209
Assets/Scripts/UX/CheckAvailableFeatures.cs


public class CheckAvailableFeatures : MonoBehaviour
{
public Button simpleAR;
public Button imageTracking;
public Button anchors;
public Button ARWorldMap;
public Button cameraImage;
public Button environmentProbes;
public Button ARCollaborationData;
public Button ARKitCoachingOverlay;
public Button scale;
public Button objectTracking;
public Button planeOcclusion;
public Button pointCloud;
public Button faceTracking;
public Button faceBlendShapes;
public Button humanSegmentation;
public Button lightEstimation;
public Button planeDetection;
public Button planeClassification;
[SerializeField]
Button m_SimpleAR;
public Button simpleAR
{
get { return m_SimpleAR; }
set { m_SimpleAR = value; }
}
[SerializeField]
Button m_ImageTracking;
public Button imageTracking
{
get { return m_ImageTracking; }
set { m_ImageTracking = value; }
}
[SerializeField]
Button m_Anchors;
public Button anchors
{
get { return m_Anchors; }
set { m_Anchors = value; }
}
[SerializeField]
Button m_ARWorldMap;
public Button ARWorldMap
{
get { return m_ARWorldMap; }
set { m_ARWorldMap = value; }
}
[SerializeField]
Button m_CameraImage;
public Button cameraImage
{
get { return m_CameraImage; }
set { m_CameraImage = value; }
}
[SerializeField]
Button m_EnvironmentProbes;
public Button environmentProbes
{
get { return m_EnvironmentProbes; }
set { m_EnvironmentProbes = value; }
}
[SerializeField]
Button m_ARCollaborationData;
public Button ARCollaborationData
{
get { return m_ARCollaborationData; }
set { m_ARCollaborationData = value; }
}
[SerializeField]
Button m_ARKitCoachingOverlay;
public Button ARKitCoachingOverlay
{
get { return m_ARKitCoachingOverlay; }
set { m_ARKitCoachingOverlay = value; }
}
[SerializeField]
Button m_Scale;
public Button scale
{
get { return m_Scale; }
set { m_Scale = value; }
}
[SerializeField]
Button m_ObjectTracking;
public Button objectTracking
{
get { return m_ObjectTracking; }
set { m_ObjectTracking = value; }
}
[SerializeField]
Button m_PlaneOcclusion;
public Button planeOcclusion
{
get { return m_PlaneOcclusion; }
set { m_PlaneOcclusion = value; }
}
[SerializeField]
Button m_PointCloud;
public Button pointCloud
{
get { return m_PointCloud; }
set { m_PointCloud = value; }
}
[SerializeField]
Button m_FaceTracking;
public Button faceTracking
{
get { return m_FaceTracking; }
set { m_FaceTracking = value; }
}
[SerializeField]
Button m_FaceBlendShapes;
public Button faceBlendShapes
{
get { return m_FaceBlendShapes; }
set { m_FaceBlendShapes = value; }
}
[SerializeField]
Button m_HumanSegmentation;
public Button humanSegmentation
{
get { return m_HumanSegmentation; }
set { m_HumanSegmentation = value; }
}
[SerializeField]
Button m_LightEstimation;
public Button lightEstimation
{
get { return m_LightEstimation; }
set { m_LightEstimation = value; }
}
[SerializeField]
Button m_PlaneDetection;
public Button planeDetection
{
get { return m_PlaneDetection; }
set { m_PlaneDetection = value; }
}
[SerializeField]
Button m_PlaneClassification;
public Button planeClassification
{
get { return m_PlaneClassification; }
set { m_PlaneClassification = value; }
}
#if UNITY_IOS
OperatingSystem os = Environment.OSVersion;

List<XRCameraSubsystemDescriptor> cameraDescriptors = new List<XRCameraSubsystemDescriptor>();
SubsystemManager.GetSubsystemDescriptors<XRCameraSubsystemDescriptor>(cameraDescriptors);
List<XRSessionSubsystemDescriptor> sessionDescriptors = new List<XRSessionSubsystemDescriptor>();
SubsystemManager.GetSubsystemDescriptors<XRSessionSubsystemDescriptor>(sessionDescriptors);
simpleAR.interactable = true;
scale.interactable = true;
m_SimpleAR.interactable = true;
m_Scale.interactable = true;
faceTracking.interactable = true;
m_FaceTracking.interactable = true;
faceBlendShapes.interactable = true;
m_FaceBlendShapes.interactable = true;
#endif
}

{
if(occlusionDescriptor.supportsHumanSegmentationDepthImage && occlusionDescriptor.supportsHumanSegmentationStencilImage)
{
humanSegmentation.interactable = true;
m_HumanSegmentation.interactable = true;
break;
}
}

foreach(XRCameraSubsystemDescriptor cameraDescriptor in cameraDescriptors)
{
//TODO: Change face blend to blendshapes (Only for ios)
lightEstimation.interactable = true;
m_LightEstimation.interactable = true;
}
}

imageTracking.interactable = true;
m_ImageTracking.interactable = true;
environmentProbes.interactable = true;
m_EnvironmentProbes.interactable = true;
if(planeDescriptors.Count > 0){
planeDetection.interactable = true;
if(planeDescriptors.Count > 0)
{
m_PlaneDetection.interactable = true;
planeClassification.interactable = true;
m_PlaneClassification.interactable = true;
break;
}
}

anchors.interactable = true;
m_Anchors.interactable = true;
objectTracking.interactable = true;
m_ObjectTracking.interactable = true;
}
if(cameraDescriptors.Count > 0)
{

{
cameraImage.interactable = true;
m_CameraImage.interactable = true;
break;
}
}

if(os.Version.Major >= 12)
if(sessionDescriptors.Count > 0 && ARKitSessionSubsystem.worldMapSupported)
ARWorldMap.interactable = true;
m_ARWorldMap.interactable = true;
ARCollaborationData.interactable = true;
m_ARCollaborationData.interactable = true;
pointCloud.interactable = true;
m_PointCloud.interactable = true;
planeOcclusion.interactable = true;
m_PlaneOcclusion.interactable = true;
if(os.Version.Major >= 13)
if(sessionDescriptors.Count > 0 && ARKitSessionSubsystem.coachingOverlaySupported)
ARKitCoachingOverlay.interactable = true;
m_ARKitCoachingOverlay.interactable = true;
}
#endif
}

15
Assets/Scripts/UX/Tooltip.cs


public class Tooltip : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public GameObject toolTip;
[SerializeField]
GameObject m_Tooltip;
public GameObject toolTip
{
get { return m_Tooltip; }
set { m_Tooltip = value; }
}
bool _enteredButton;
Vector3 _toolTipOffset;
// Start is called before the first frame update

void Update()
{
if(_enteredButton){
toolTip.transform.position = Input.mousePosition + _toolTipOffset;
m_Tooltip.transform.position = Input.mousePosition + _toolTipOffset;
}
}

_enteredButton = true;
if(!gameObject.GetComponent<Button>().interactable)
{
toolTip.SetActive(true);
m_Tooltip.SetActive(true);
}
}

_enteredButton = false;
toolTip.SetActive(false);
m_Tooltip.SetActive(false);
}
}

12
Packages/manifest.json


"com.unity.ide.rider": "1.1.4",
"com.unity.ide.vscode": "1.1.4",
"com.unity.purchasing": "2.0.6",
"com.unity.test-framework": "1.1.9",
"com.unity.test-framework": "1.1.11",
"com.unity.xr.arcore": "3.1.0-preview.4",
"com.unity.xr.arfoundation": "3.1.0-preview.4",
"com.unity.xr.arkit": "3.1.0-preview.4",
"com.unity.xr.arkit-face-tracking": "3.1.0-preview.4",
"com.unity.xr.legacyinputhelpers": "2.0.6",
"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",
"com.unity.modules.animation": "1.0.0",

5
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

- enabled: 0
path: Assets/Scenes/ImageTracking/ImageTracking.unity
guid: e0b018a3c3b5cfd4c8e316706ec0a18c
- enabled: 0
path: Assets/Scenes/LightEstimation/ARKitHDRLightEstimation.unity
guid: f7322e09f4047458fbc45af303830f01
- enabled: 0
path: Assets/Scenes/LightEstimation/LightEstimation.unity
guid: 2f0cbc82480584c258f99f0d9e4ba302

56
ProjectSettings/EditorSettings.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!159 &1
EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2
m_LineEndingsForNewScripts: 2
m_DefaultBehaviorMode: 0
m_SpritePackerMode: 0
m_SpritePackerPaddingPower: 1
m_EtcTextureCompressorBehavior: 1
m_EtcTextureFastCompressor: 1
m_EtcTextureNormalCompressor: 2
m_EtcTextureBestCompressor: 4
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
m_ProjectGenerationRootNamespace:
m_UserGeneratedProjectSuffix:
m_CollabEditorSettings:
inProgressEnabled: 1
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!159 &1
EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2
m_LineEndingsForNewScripts: 2
m_DefaultBehaviorMode: 0
m_PrefabRegularEnvironment: {fileID: 0}
m_PrefabUIEnvironment: {fileID: 0}
m_SpritePackerMode: 0
m_SpritePackerPaddingPower: 1
m_EtcTextureCompressorBehavior: 1
m_EtcTextureFastCompressor: 1
m_EtcTextureNormalCompressor: 2
m_EtcTextureBestCompressor: 4
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref
m_ProjectGenerationRootNamespace:
m_CollabEditorSettings:
inProgressEnabled: 1
m_EnableTextureStreamingInEditMode: 1
m_EnableTextureStreamingInPlayMode: 1
m_AsyncShaderCompilation: 1
m_EnterPlayModeOptionsEnabled: 0
m_EnterPlayModeOptions: 3
m_ShowLightmapResolutionOverlay: 1
m_UseLegacyProbeSampleCount: 1
m_AssetPipelineMode: 1
m_CacheServerMode: 0
m_CacheServerEndpoint:
m_CacheServerNamespacePrefix: default
m_CacheServerEnableDownload: 1
m_CacheServerEnableUpload: 1

4
ProjectSettings/GraphicsSettings.asset


--- !u!30 &1
GraphicsSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
serializedVersion: 13
m_Deferred:
m_Mode: 1
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}

- {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}

m_LightsUseLinearIntensity: 0
m_LightsUseColorTemperature: 0
m_LogWhenShaderIsCompiled: 0
m_AllowEnlightenSupportForUpgradedProject: 1

54
ProjectSettings/ProjectSettings.asset


--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 18
serializedVersion: 20
productGUID: 35066d27dbe774136afcdffb68d5427d
AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0

m_StackTraceTypes: 010000000100000001000000010000000100000001000000
iosShowActivityIndicatorOnLoading: -1
androidShowActivityIndicatorOnLoading: -1
displayResolutionDialog: 1
iosUseCustomAppBackgroundBehavior: 0
iosAllowHTTPDownload: 1
allowedAutorotateToPortrait: 1

useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games
gpuSkinning: 1
graphicsJobs: 0
xboxPIXTextureCapture: 0
xboxEnableAvatar: 0
xboxEnableKinect: 0

allowFullscreenSwitch: 1
graphicsJobMode: 0
fullscreenMode: 1
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0

xboxOneMonoLoggingLevel: 0
xboxOneLoggingLevel: 1
xboxOneDisableEsram: 0
xboxOneEnableTypeOptimization: 0
xboxOnePresentImmediateThreshold: 0
switchQueueCommandMemory: 0
switchQueueControlMemory: 16384

switchNVNOtherPoolsGranularity: 16777216
vulkanNumSwapchainBuffers: 3
vulkanEnableSetSRGBWrite: 0
m_SupportedAspectRatios:
4:3: 1

v2Signing: 0
enable360StereoCapture: 0
isWsaHolographicRemotingEnabled: 0
protectGraphicsMemory: 0
D3DHDRBitDepth: 0
m_ColorGamuts: 00000000
targetPixelDensity: 30
resolutionScalingMode: 0

iOSTargetOSVersionString: 11.0
tvOSSdkVersion: 0
tvOSRequireExtendedGameController: 0
tvOSTargetOSVersionString: 9.0
tvOSTargetOSVersionString: 10.0
uIPrerenderedIcon: 0
uIRequiresPersistentWiFi: 0
uIRequiresFullScreen: 1

androidGamepadSupportLevel: 0
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons: []
m_BuildTargetPlatformIcons:
- m_BuildTarget: Android

- m_BuildTarget: Standalone
m_StaticBatching: 1
m_DynamicBatching: 0
m_BuildTargetGraphicsJobs:
- m_BuildTarget: MacStandaloneSupport
m_GraphicsJobs: 0
- m_BuildTarget: Switch
m_GraphicsJobs: 0
- m_BuildTarget: MetroSupport
m_GraphicsJobs: 0
- m_BuildTarget: AppleTVSupport
m_GraphicsJobs: 0
- m_BuildTarget: BJMSupport
m_GraphicsJobs: 0
- m_BuildTarget: LinuxStandaloneSupport
m_GraphicsJobs: 0
- m_BuildTarget: PS4Player
m_GraphicsJobs: 0
- m_BuildTarget: iOSSupport
m_GraphicsJobs: 0
- m_BuildTarget: WindowsStandaloneSupport
m_GraphicsJobs: 0
- m_BuildTarget: XboxOnePlayer
m_GraphicsJobs: 0
- m_BuildTarget: LuminSupport
m_GraphicsJobs: 0
- m_BuildTarget: AndroidPlayer
m_GraphicsJobs: 0
- m_BuildTarget: WebGLSupport
m_GraphicsJobs: 0
m_BuildTargetGraphicsJobMode:
- m_BuildTarget: PS4Player
m_GraphicsJobMode: 0
- m_BuildTarget: XboxOnePlayer
m_GraphicsJobMode: 0
m_BuildTargetGraphicsAPIs: []
m_BuildTargetVRSettings:
- m_BuildTarget: Standalone

openGLRequireES31: 0
openGLRequireES31AEP: 0
openGLRequireES32: 0
vuforiaEnabled: 0
m_TemplateCustomTags: {}
mobileMTRendering:
Android: 1

ps4contentSearchFeaturesUsed: 0
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []
ps4attribVROutputEnabled: 0
monoEnv:
splashScreenBackgroundSourceLandscape: {fileID: 0}
splashScreenBackgroundSourcePortrait: {fileID: 0}

XboxOneAllowedProductIds: []
XboxOnePersistentLocalStorageSize: 0
XboxOneXTitleMemory: 8
xboxOneScriptCompiler: 1
XboxOneOverrideIdentityName:
vrEditorSettings:
daydream:

luminVersion:
m_VersionCode: 1
m_VersionName:
facebookSdkVersion: 7.9.4
facebookAppId:
facebookCookies: 1
facebookLogging: 1
facebookStatus: 1
facebookXfbml: 0
facebookFrictionlessRequests: 1
apiCompatibilityLevel: 6
cloudProjectId:
framebufferDepthMemorylessMode: 0

4
ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2019.2.19f1
m_EditorVersionWithRevision: 2019.2.19f1 (929ab4d01772)
m_EditorVersion: 2019.3.3f1
m_EditorVersionWithRevision: 2019.3.3f1 (7ceaae5f7503)

6
ProjectSettings/QualitySettings.asset


asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Low

asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Medium

asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: High

asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Very High

asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Ultra

asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality:
Android: 2

53
README.md


# AR Foundation Samples
Example projects that use [*AR Foundation 3.0*](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.0/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@4.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.0/manual/index.html))
* ARCore XR Plugin ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arcore@3.0/manual/index.html))
* ARKit XR Plugin ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arkit@3.0/manual/index.html))
* ARKit Face Tracking ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arkit-face-tracking@3.0/manual/index.html))
* ARFoundation ([documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.0/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))
## Why version should I use?
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.
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.
In ARFoundation, this means:
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).
| 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

Demonstrates light estimation information from the camera frame. You should see values for "Brightness", "Color Temp", and "Color Correct" on screen. Most devices only support a subset of these 3, so some will be listed as "unavailable."
This sample also attempts to read HDR lighting information. On iOS, this is only available when face tracking is enabled and requires a device with a TrueDepth camera (such as an iPhone X, XS or 11). When available, a virtual arrow appears in front of the camera which indicates the estimated main light direction. The virtual light direction is also updated, so that virtual content appears to be lit from the direction of the real light source.
The relevant scripts are on the "Directional Light" GameObject.
## Anchors

## 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.0/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.0/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;
}
}
}
}

49
Assets/Scenes/LightEstimation/PlatformSelector.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
/// <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.
/// </summary>
[RequireComponent(typeof(ARSessionOrigin))]
[RequireComponent(typeof(ARFaceManager))]
public class PlatformSelector : MonoBehaviour
{
[SerializeField]
GameObject m_WorldSpaceObject;
public GameObject worldSpaceObject
{
get => m_WorldSpaceObject;
set => m_WorldSpaceObject = value;
}
void OnEnable()
{
#if UNITY_IOS
GetComponent<ARFaceManager>().enabled = true;
#else
GetComponent<ARFaceManager>().enabled = false;
worldSpaceObject?.SetActive(true);
Application.onBeforeRender += OnBeforeRender;
#endif
}
void OnDisable()
{
GetComponent<ARFaceManager>().enabled = false;
Application.onBeforeRender -= OnBeforeRender;
}
void OnBeforeRender()
{
var camera = GetComponent<ARSessionOrigin>().camera;
if (camera && worldSpaceObject)
{
worldSpaceObject.transform.position = camera.transform.position + camera.transform.forward;
}
}
}

11
Assets/Scenes/LightEstimation/PlatformSelector.cs.meta


fileFormatVersion: 2
guid: 380e2ad9ceb884139a45ff2fd42db8f9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

14
Assets/Scenes/LightEstimation/Rotator.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rotator : MonoBehaviour
{
float m_Angle;
void Update()
{
m_Angle += Time.deltaTime * 10f;
transform.rotation = Quaternion.Euler(m_Angle, m_Angle, m_Angle);
}
}

11
Assets/Scenes/LightEstimation/Rotator.cs.meta


fileFormatVersion: 2
guid: a7cfdbcf3ec334776ac44c24c8b3e991
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

77
Assets/Scenes/LightEstimation/Shiny.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Shiny
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 0.694
- _Glossiness: 0.5
- _GlossyReflections: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 1
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

8
Assets/Scenes/LightEstimation/Shiny.mat.meta


fileFormatVersion: 2
guid: d1f734de3fd0c4a2b9b0042435f673df
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

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

正在加载...
取消
保存