浏览代码

Merge pull request #78 from unity/fixes

Samples Fixes
/4.1
GitHub Enterprise 4 年前
当前提交
d3979d31
共有 11 个文件被更改,包括 701 次插入495 次删除
  1. 239
      Assets/Scenes/ARFoundationMenu/Menu.unity
  2. 23
      Assets/Scenes/CameraGrain/CameraGrain.cs
  3. 339
      Assets/Scenes/CameraGrain/CameraGrain.unity
  4. 68
      Assets/Scenes/CameraGrain/CameraGrainCube.prefab
  5. 273
      Assets/Scenes/SimpleAR/SimpleAR.unity
  6. 33
      Assets/Scripts/UX/ARSceneSelectUI.cs
  7. 5
      Assets/Scripts/UX/ActiveMenu.cs
  8. 155
      Assets/Scripts/UX/CheckAvailableFeatures.cs
  9. 5
      ProjectSettings/EditorBuildSettings.asset
  10. 45
      Assets/Scenes/SimpleAR/SessionReloader.cs
  11. 11
      Assets/Scenes/SimpleAR/SessionReloader.cs.meta

239
Assets/Scenes/ARFoundationMenu/Menu.unity


m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 256707486}
m_CullTransparentMesh: 0
--- !u!1 &305012987
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 305012988}
- component: {fileID: 305012990}
- component: {fileID: 305012989}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &305012988
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 305012987}
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: 1726760292}
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 &305012989
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 305012987}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Camera Grain
--- !u!222 &305012990
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 305012987}
m_CullTransparentMesh: 0
--- !u!1 &340560478
GameObject:
m_ObjectHideFlags: 0

m_FixationPoint: {fileID: 375968642}
m_EyePoses: {fileID: 550758920}
m_EyeLasers: {fileID: 1507995259}
m_SampleUX: {fileID: 0}
m_CameraGrain: {fileID: 1726760294}
--- !u!1 &786358435
GameObject:
m_ObjectHideFlags: 0

- {fileID: 1324254625}
- {fileID: 912198811}
- {fileID: 251164958}
- {fileID: 1868840081}
- {fileID: 1868840081}
- {fileID: 1726760292}
m_Father: {fileID: 1413559114}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1704130875}
m_CullTransparentMesh: 0
--- !u!1 &1726760291
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1726760292}
- component: {fileID: 1726760296}
- component: {fileID: 1726760295}
- component: {fileID: 1726760294}
- component: {fileID: 1726760293}
m_Layer: 5
m_Name: Camera Grain
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1726760292
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1726760291}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2.8958, y: 2.8958, z: 2.8958}
m_Children:
- {fileID: 305012988}
m_Father: {fileID: 1569808631}
m_RootOrder: 22
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: -650}
m_SizeDelta: {x: 110, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1726760293
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1726760291}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 16733cd6749cf4d96be9df0329c6938a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Tooltip: {fileID: 2094799242}
--- !u!114 &1726760294
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1726760291}
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: 0
m_TargetGraphic: {fileID: 1726760295}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 774532498}
m_TargetAssemblyTypeName: UnityEngine.XR.ARFoundation.Samples.ARSceneSelectUI,
Assembly-CSharp
m_MethodName: CameraGrainButtonPressed
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1726760295
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1726760291}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 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 &1726760296
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1726760291}
m_CullTransparentMesh: 0
--- !u!1 &1742233074
GameObject:
m_ObjectHideFlags: 0

m_Children:
- {fileID: 769789622}
m_Father: {fileID: 1569808631}
m_RootOrder: 21
m_RootOrder: 20
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_HandleRect: {fileID: 1130901185}
m_Direction: 2
m_Value: 1
m_Size: 0.26225123
m_Size: 0.20706683
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:

m_Children:
- {fileID: 1555465366}
m_Father: {fileID: 1569808631}
m_RootOrder: 20
m_RootOrder: 21
m_AnchoredPosition: {x: -360, y: -650}
m_AnchoredPosition: {x: -350, y: -650}
m_SizeDelta: {x: 110, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2011106400

23
Assets/Scenes/CameraGrain/CameraGrain.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
using UnityEngine;
public class CameraGrain: MonoBehaviour
[RequireComponent(typeof(Renderer))]
public class CameraGrain : MonoBehaviour
get { return m_CameraManager; }
set { m_CameraManager = value; }
get => m_CameraManager;
set => m_CameraManager = value;
}
Renderer m_Renderer;

if(m_CameraManager == null)
if (m_CameraManager == null)
m_CameraManager = FindObjectOfType (typeof(ARCameraManager)) as ARCameraManager;
m_CameraManager = FindObjectOfType<ARCameraManager>();
}
m_Renderer = GetComponent<Renderer>();

m_CameraManager.frameReceived -= OnReceivedFrame;
}
void OnReceivedFrame(ARCameraFrameEventArgs eventArgs){
if(m_Renderer != null && eventArgs.cameraGrainTexture != null)
void OnReceivedFrame(ARCameraFrameEventArgs eventArgs)
{
if (m_Renderer && eventArgs.cameraGrainTexture)
{
m_Renderer.material.SetTexture("_NoiseTex", eventArgs.cameraGrainTexture);
m_Renderer.material.SetFloat("_NoiseIntensity", eventArgs.noiseIntensity);

}
}

339
Assets/Scenes/CameraGrain/CameraGrain.unity


m_Script: {fileID: 11500000, guid: e1760703bbd54c04488a8d10600262ab, type: 3}
m_Name:
m_EditorClassIdentifier:
m_PlanePrefab: {fileID: 0}
m_PlanePrefab: {fileID: 1568414836858200, guid: f0e0be81472ff1243aa2afa27e5d0e61,
type: 3}
m_DetectionMode: -1
--- !u!114 &121899730
MonoBehaviour:

m_Component:
- component: {fileID: 1032448804}
- component: {fileID: 1032448798}
- component: {fileID: 1032448803}
- component: {fileID: 1032448802}
- component: {fileID: 1032448800}
- component: {fileID: 1032448800}
m_Layer: 0
m_Name: AR Camera
m_TagString: MainCamera

m_GameObject: {fileID: 1032448797}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b15f82cc229284894964d2d30806969d, type: 3}
m_Script: {fileID: 11500000, guid: 6e3c44306fb1e439a9f18b2212b8ab70, type: 3}
m_HumanSegmentationStencilMode: 1
m_HumanSegmentationDepthMode: 1
m_EnvironmentDepthMode: 0
m_OcclusionPreferenceMode: 0
--- !u!114 &1032448801
MonoBehaviour:
m_ObjectHideFlags: 0

m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 1
--- !u!114 &1032448802
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1032448797}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5a2a9c34df4095f47b9ca8f975175f5b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Device: 0
m_PoseSource: 6
m_PoseProviderComponent: {fileID: 0}
m_TrackingType: 0
m_UpdateType: 0
m_UseRelativeTransform: 1
--- !u!81 &1032448803
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1032448797}
m_Enabled: 1
--- !u!4 &1032448804
Transform:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 90290c13d4a3d46eea32be3d6a1a14c4, type: 3}
--- !u!1001 &1312286183
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1319230754}
m_Modifications:
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_SizeDelta.x
value: 100
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_SizeDelta.y
value: 100
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3225625820226493293, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_Name
value: BackButtonManager
objectReference: {fileID: 0}
- target: {fileID: 4792654351133402651, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -150
objectReference: {fileID: 0}
- target: {fileID: 4792654351133402651, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -150
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4ee22c1f54b174122b6a766fe09e0de8, type: 3}
--- !u!224 &1312286184 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8,
type: 3}
m_PrefabInstance: {fileID: 1312286183}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1319230750
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1319230754}
- component: {fileID: 1319230753}
- component: {fileID: 1319230752}
- component: {fileID: 1319230751}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1319230751
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319230750}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1319230752
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319230750}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &1319230753
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319230750}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1319230754
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319230750}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1312286184}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1775920777
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1775920780}
- component: {fileID: 1775920779}
- component: {fileID: 1775920778}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1775920778
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1775920777}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1775920779
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1775920777}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1775920780
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1775920777}
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: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2013183935
GameObject:
m_ObjectHideFlags: 0

68
Assets/Scenes/CameraGrain/CameraGrainCube.prefab


serializedVersion: 6
m_Component:
- component: {fileID: 2588577189989761187}
- component: {fileID: 2588577189989761188}
- component: {fileID: 2588577189989761189}
- component: {fileID: 2588577189989761190}
- component: {fileID: 2588577189989761191}
m_Layer: 0
m_Name: CameraGrainCube
m_TagString: Untagged

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2588577189989761176}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 7573250899456227516}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8918746073456767968
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7573250899456227516}
- component: {fileID: 3309178495531656673}
- component: {fileID: 3568572736835037291}
- component: {fileID: 2777322281172602158}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7573250899456227516
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8918746073456767968}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.15, z: 0}
m_Father: {fileID: 0}
m_Father: {fileID: 2588577189989761187}
--- !u!33 &2588577189989761188
--- !u!33 &3309178495531656673
m_GameObject: {fileID: 2588577189989761176}
m_GameObject: {fileID: 8918746073456767968}
--- !u!23 &2588577189989761189
--- !u!23 &3568572736835037291
m_GameObject: {fileID: 2588577189989761176}
m_GameObject: {fileID: 8918746073456767968}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1

m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &2588577189989761190
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2588577189989761176}
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!114 &2588577189989761191
--- !u!114 &2777322281172602158
m_GameObject: {fileID: 2588577189989761176}
m_GameObject: {fileID: 8918746073456767968}
m_CameraManager: {fileID: 0}

273
Assets/Scenes/SimpleAR/SimpleAR.unity


m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 4
--- !u!1 &635543929
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 635543931}
- component: {fileID: 635543930}
m_Layer: 0
m_Name: SessionReloader
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &635543930
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 635543929}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 68a46c818af354896be90ada1adb43c0, type: 3}
m_Name:
m_EditorClassIdentifier:
session: {fileID: 427002219}
sessionPrefab: {fileID: 3811591508773167257, guid: 90290c13d4a3d46eea32be3d6a1a14c4,
type: 3}
pauseButton: {fileID: 1825744201}
resumeButton: {fileID: 1882240985}
resetButton: {fileID: 1608133452}
--- !u!4 &635543931
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 635543929}
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!1 &767587104
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 767587105}
- component: {fileID: 767587107}
- component: {fileID: 767587106}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &767587105
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 767587104}
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: 2083744216}
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 &767587106
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 767587104}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 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: 0
m_Text: Reload
--- !u!222 &767587107
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 767587104}
m_CullTransparentMesh: 0
--- !u!1001 &931840762
PrefabInstance:
m_ObjectHideFlags: 0

m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1608133451}
- {fileID: 2083744216}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

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

m_Children:
- {fileID: 1293644576}
m_Father: {fileID: 948874508}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

m_Children:
- {fileID: 1488212448}
m_Father: {fileID: 948874508}
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_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1882240983}
m_CullTransparentMesh: 0
--- !u!1 &2083744215
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2083744216}
- component: {fileID: 2083744219}
- component: {fileID: 2083744218}
- component: {fileID: 2083744217}
m_Layer: 5
m_Name: Reload Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2083744216
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2083744215}
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: 767587105}
m_Father: {fileID: 948874508}
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: -251, y: 0}
m_SizeDelta: {x: 250.89, y: 90.3}
m_Pivot: {x: 1, y: 0}
--- !u!114 &2083744217
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2083744215}
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: Highlighted
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 2083744218}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 635543930}
m_TargetAssemblyTypeName:
m_MethodName: ReloadSession
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &2083744218
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2083744215}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 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 &2083744219
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2083744215}
m_CullTransparentMesh: 0
--- !u!1001 &3811591508619061747
PrefabInstance:
m_ObjectHideFlags: 0

- target: {fileID: 3811591508773167263, guid: 90290c13d4a3d46eea32be3d6a1a14c4,
type: 3}
propertyPath: m_RootOrder
value: 2
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3811591508773167263, guid: 90290c13d4a3d46eea32be3d6a1a14c4,
type: 3}

33
Assets/Scripts/UX/ARSceneSelectUI.cs


GameObject m_AllMenu;
public GameObject allMenu
{
get { return m_AllMenu; }
set { m_AllMenu = value; }
get => m_AllMenu;
set => m_AllMenu = value;
}
[SerializeField]

get { return m_ImageTrackingMenu; }
set { m_ImageTrackingMenu = value; }
get => m_ImageTrackingMenu;
set => m_ImageTrackingMenu = value;
}
[SerializeField]

get { return m_FaceTrackingMenu; }
set { m_FaceTrackingMenu = value; }
get => m_FaceTrackingMenu;
set => m_FaceTrackingMenu = value;
}
[SerializeField]

GameObject m_PlaneDetectionMenu;
public GameObject planeDetectionMenu
{
get { return m_PlaneDetectionMenu; }
set { m_PlaneDetectionMenu = value; }
get => m_PlaneDetectionMenu;
set => m_PlaneDetectionMenu = value;
}
[SerializeField]

get { return m_MeshingMenu; }
set { m_MeshingMenu = value; }
get => m_MeshingMenu;
set => m_MeshingMenu = value;
}
[SerializeField]

get { return m_DepthMenu; }
set { m_DepthMenu = value; }
get => m_DepthMenu;
set => m_DepthMenu = value;
}
[SerializeField]

get { return m_LightEstimationMenu; }
set { m_LightEstimationMenu = value; }
get => m_LightEstimationMenu;
set => m_LightEstimationMenu = value;
}
void Start()

public void InputSystemButtonPressed()
{
LoadScene("InputSystem");
}
public void CameraGrainButtonPressed()
{
LoadScene("CameraGrain");
}
void ScrollToStartPosition()

5
Assets/Scripts/UX/ActiveMenu.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;
namespace UnityEngine.XR.ARFoundation.Samples
{

public static class ActiveMenu
{
public static MenuType currentMenu { get; set; }
}
}

155
Assets/Scripts/UX/CheckAvailableFeatures.cs


Button m_SimpleAR;
public Button simpleAR
{
get { return m_SimpleAR; }
set { m_SimpleAR = value; }
get => m_SimpleAR;
set => m_SimpleAR = value;
}
[SerializeField]

get { return m_ImageTracking; }
set { m_ImageTracking = value; }
get => m_ImageTracking;
set => m_ImageTracking = value;
}
[SerializeField]

get { return m_Anchors; }
set { m_Anchors = value; }
get => m_Anchors;
set => m_Anchors = value;
}
[SerializeField]

get { return m_ARWorldMap; }
set { m_ARWorldMap = value; }
get => m_ARWorldMap;
set => m_ARWorldMap = value;
}
[SerializeField]

get { return m_CpuImages; }
set { m_CpuImages = value; }
get => m_CpuImages;
set => m_CpuImages = value;
}
[SerializeField]

get { return m_EnvironmentProbes; }
set { m_EnvironmentProbes = value; }
get => m_EnvironmentProbes;
set => m_EnvironmentProbes = value;
}
[SerializeField]

get { return m_ARCollaborationData; }
set { m_ARCollaborationData = value; }
get => m_ARCollaborationData;
set => m_ARCollaborationData = value;
}
[SerializeField]

get { return m_ARKitCoachingOverlay; }
set { m_ARKitCoachingOverlay = value; }
get => m_ARKitCoachingOverlay;
set => m_ARKitCoachingOverlay = value;
}
[SerializeField]

get { return m_Scale; }
set { m_Scale = value; }
get => m_Scale;
set => m_Scale = value;
}
[SerializeField]

get { return m_ObjectTracking; }
set { m_ObjectTracking = value; }
get => m_ObjectTracking;
set => m_ObjectTracking = value;
}
[SerializeField]

get { return m_PlaneOcclusion; }
set { m_PlaneOcclusion = value; }
get => m_PlaneOcclusion;
set => m_PlaneOcclusion = value;
}
[SerializeField]

get { return m_PointCloud; }
set { m_PointCloud = value; }
get => m_PointCloud;
set => m_PointCloud = value;
}
[SerializeField]

get { return m_FaceTracking; }
set { m_FaceTracking = value; }
get => m_FaceTracking;
set => m_FaceTracking = value;
}
[SerializeField]

get { return m_FaceBlendShapes; }
set { m_FaceBlendShapes = value; }
get => m_FaceBlendShapes;
set => m_FaceBlendShapes = value;
}
[SerializeField]

get { return m_FaceRegions; }
set { m_FaceRegions = value; }
get => m_FaceRegions;
set => m_FaceRegions = value;
}
[SerializeField]

get { return m_BodyTracking; }
set { m_BodyTracking = value; }
get => m_BodyTracking;
set => m_BodyTracking = value;
}
[SerializeField]

get { return m_LightEstimation; }
set { m_LightEstimation = value; }
get => m_LightEstimation;
set => m_LightEstimation = value;
}
[SerializeField]

get { return m_BasicLightEstimation; }
set { m_BasicLightEstimation = value; }
get => m_BasicLightEstimation;
set => m_BasicLightEstimation = value;
}
[SerializeField]

get { return m_HDRLightEstimation; }
set { m_HDRLightEstimation = value; }
get => m_HDRLightEstimation;
set => m_HDRLightEstimation = value;
}
[SerializeField]

get { return m_PlaneDetection; }
set { m_PlaneDetection = value; }
get => m_PlaneDetection;
set => m_PlaneDetection = value;
}
[SerializeField]

get { return m_PlaneClassification; }
set { m_PlaneClassification = value; }
get => m_PlaneClassification;
set => m_PlaneClassification = value;
}
[SerializeField]

get { return m_Meshing; }
set { m_Meshing = value; }
get => m_Meshing;
set => m_Meshing = value;
}
[SerializeField]

get { return m_Interaction; }
set { m_Interaction = value; }
get => m_Interaction;
set => m_Interaction = value;
}
[SerializeField]

get { return m_FixationPoint; }
set { m_FixationPoint = value; }
get => m_FixationPoint;
set => m_FixationPoint = value;
}
[SerializeField]

get { return m_EyePoses; }
set { m_EyePoses = value; }
get => m_EyePoses;
set => m_EyePoses = value;
}
[SerializeField]

get { return m_EyeLasers; }
set { m_EyeLasers = value; }
get => m_EyeLasers;
set => m_EyeLasers = value;
}
[SerializeField]

get { return m_CheckSupport; }
set { m_CheckSupport = value; }
get => m_CheckSupport;
set => m_CheckSupport = value;
}
[SerializeField]

get { return m_Depth; }
set { m_Depth = value; }
get => m_Depth;
set => m_Depth = value;
}
[SerializeField]

set => m_InputSystem = value;
}
// Start is called before the first frame update
[SerializeField]
Button m_CameraGrain;
public Button cameraGrain
{
get => m_CameraGrain;
set => m_CameraGrain = value;
}
SubsystemManager.GetSubsystemDescriptors<XRPlaneSubsystemDescriptor>(planeDescriptors);
SubsystemManager.GetSubsystemDescriptors(planeDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRRaycastSubsystemDescriptor>(rayCastDescriptors);
SubsystemManager.GetSubsystemDescriptors(rayCastDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRFaceSubsystemDescriptor>(faceDescriptors);
SubsystemManager.GetSubsystemDescriptors(faceDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRImageTrackingSubsystemDescriptor>(imageDescriptors);
SubsystemManager.GetSubsystemDescriptors(imageDescriptors);
SubsystemManager.GetSubsystemDescriptors<XREnvironmentProbeSubsystemDescriptor>(envDescriptors);
SubsystemManager.GetSubsystemDescriptors(envDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRAnchorSubsystemDescriptor>(anchorDescriptors);
SubsystemManager.GetSubsystemDescriptors(anchorDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRObjectTrackingSubsystemDescriptor>(objectDescriptors);
SubsystemManager.GetSubsystemDescriptors(objectDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRParticipantSubsystemDescriptor>(participantDescriptors);
SubsystemManager.GetSubsystemDescriptors(participantDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRDepthSubsystemDescriptor>(depthDescriptors);
SubsystemManager.GetSubsystemDescriptors(depthDescriptors);
SubsystemManager.GetSubsystemDescriptors<XROcclusionSubsystemDescriptor>(occlusionDescriptors);
SubsystemManager.GetSubsystemDescriptors(occlusionDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRCameraSubsystemDescriptor>(cameraDescriptors);
SubsystemManager.GetSubsystemDescriptors(cameraDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRSessionSubsystemDescriptor>(sessionDescriptors);
SubsystemManager.GetSubsystemDescriptors(sessionDescriptors);
SubsystemManager.GetSubsystemDescriptors<XRHumanBodySubsystemDescriptor>(bodyTrackingDescriptors);
SubsystemManager.GetSubsystemDescriptors(bodyTrackingDescriptors);
if(planeDescriptors.Count > 0 && rayCastDescriptors.Count > 0)
{

m_LightEstimation.interactable = true;
foreach(var cameraDescriptor in cameraDescriptors)
{
if((cameraDescriptor.supportsAverageBrightness || cameraDescriptor.supportsAverageIntensityInLumens) &&
if ((cameraDescriptor.supportsAverageBrightness || cameraDescriptor.supportsAverageIntensityInLumens) &&
if(cameraDescriptor.supportsFaceTrackingHDRLightEstimation || cameraDescriptor.supportsWorldTrackingHDRLightEstimation)
if (cameraDescriptor.supportsFaceTrackingHDRLightEstimation || cameraDescriptor.supportsWorldTrackingHDRLightEstimation)
#if UNITY_2020_2_OR_NEWER
m_CameraGrain.interactable = cameraDescriptor.supportsCameraGrain;
#endif
}
}

5
ProjectSettings/EditorBuildSettings.asset


- enabled: 1
path: Assets/Scenes/Anchors.unity
guid: 5cba9114a192a46a7aef31da62316e39
- enabled: 0
- enabled: 1
path: Assets/Scenes/CameraGrain/CameraGrain.unity
guid: 68237ded327024ec39c1317a214ad56f
- enabled: 1

- enabled: 1
path: Assets/Scenes/SimpleAR/SimpleAR.unity
guid: 99c9720ab356a0642a771bea13969a05
- enabled: 1
path: Assets/Scenes/UX/SampleUXScene.unity
guid: 3b42d67a72bbc4004bf713db0e312326
m_configObjects:
UnityEditor.XR.ARCore.ARCoreSettings: {fileID: 11400000, guid: f8ce26fe3bc69499b9be4b2378e97a94,
type: 2}

45
Assets/Scenes/SimpleAR/SessionReloader.cs


using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.XR.ARFoundation;
namespace UnityEngine.XR.ARFoundation.Samples
{
/// <summary>
/// Reloads the ARSession by first destroying the ARSession's GameObject
/// and then instantiating a new ARSession from a Prefab.
/// </summary>
public class SessionReloader : MonoBehaviour
{
public ARSession session;
public GameObject sessionPrefab;
public Button pauseButton;
public Button resumeButton;
public Button resetButton;
public void ReloadSession()
{
if (session != null)
{
StartCoroutine(DoReload());
}
}
IEnumerator DoReload()
{
Destroy(session.gameObject);
yield return null;
if (sessionPrefab != null)
{
session = Instantiate(sessionPrefab).GetComponent<ARSession>();
// Hook the buttons back up
resetButton.onClick.AddListener(session.Reset);
pauseButton.onClick.AddListener(() => { session.enabled = false; });
resumeButton.onClick.AddListener(() => { session.enabled = true; });
}
}
}
}

11
Assets/Scenes/SimpleAR/SessionReloader.cs.meta


fileFormatVersion: 2
guid: 68a46c818af354896be90ada1adb43c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存