602 changes: 301 additions & 301 deletions Assets/GoogleARCore/Examples/AugmentedFaces/Scenes/AugmentedFaces.unity

Large diffs are not rendered by default.

@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ARCoreAugmentedFaceMeshFilter.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ARCoreAugmentedFaceRig.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="AugmentedFacesExampleController.cs" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
252 changes: 126 additions & 126 deletions Assets/GoogleARCore/Examples/AugmentedImage/Scenes/AugmentedImage.unity
Expand Up @@ -113,53 +113,6 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &268627364
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1772147192650458, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
serializedVersion: 5
m_Component:
- component: {fileID: 268627366}
- component: {fileID: 268627365}
m_Layer: 0
m_Name: ARCore Device
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &268627365
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114451889682527732, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 268627364}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d4ca0c6a3af6b4635b7e98c6ea0a0cf9, type: 3}
m_Name:
m_EditorClassIdentifier:
DeviceCameraDirection: 0
SessionConfig: {fileID: 11400000, guid: e3a0819a20dbf48e0b82c8d8d31b9d68, type: 2}
CameraConfigFilter: {fileID: 11400000, guid: 200b4cba649e3413088e285251ccf44e, type: 2}
--- !u!4 &268627366
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4442908887562770, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 268627364}
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: 790926325}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &732595306
Prefab:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -212,108 +165,55 @@ Prefab:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c10877f7cd5764de18d46d7b777d1faa, type: 2}
m_RootGameObject: {fileID: 268627364}
m_RootGameObject: {fileID: 1067049994}
m_IsPrefabParent: 0
--- !u!1 &790926324
--- !u!1 &1067049994
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1637996540812124, guid: c10877f7cd5764de18d46d7b777d1faa,
m_PrefabParentObject: {fileID: 1772147192650458, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
serializedVersion: 5
m_Component:
- component: {fileID: 790926325}
- component: {fileID: 790926328}
- component: {fileID: 790926327}
- component: {fileID: 790926326}
- component: {fileID: 1067049996}
- component: {fileID: 1067049995}
m_Layer: 0
m_Name: First Person Camera
m_TagString: MainCamera
m_Name: ARCore Device
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &790926325
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4497055787654456, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 790926324}
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: 268627366}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &790926326
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114876698896786350, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 790926324}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: eb172c260d42e4f62945afda50892c0c, type: 3}
m_Name:
m_EditorClassIdentifier:
BackgroundMaterial: {fileID: 2100000, guid: 03ad0130a037647aeb60218f61aca114, type: 2}
--- !u!114 &790926327
--- !u!114 &1067049995
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114963366853050710, guid: c10877f7cd5764de18d46d7b777d1faa,
m_PrefabParentObject: {fileID: 114451889682527732, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 790926324}
m_GameObject: {fileID: 1067049994}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1742909100, guid: 3a84de5cd0624681b6b6dcd8921d912a, type: 3}
m_Script: {fileID: 11500000, guid: d4ca0c6a3af6b4635b7e98c6ea0a0cf9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Device: 0
m_PoseSource: 6
m_TrackingType: 0
m_UpdateType: 1
m_UseRelativeTransform: 1
--- !u!20 &790926328
Camera:
DeviceCameraDirection: 0
SessionConfig: {fileID: 11400000, guid: e3a0819a20dbf48e0b82c8d8d31b9d68, type: 2}
CameraConfigFilter: {fileID: 11400000, guid: 200b4cba649e3413088e285251ccf44e, type: 2}
--- !u!4 &1067049996
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 20155940112608238, guid: c10877f7cd5764de18d46d7b777d1faa,
m_PrefabParentObject: {fileID: 4442908887562770, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 790926324}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.05
far clip plane: 200
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_GameObject: {fileID: 1067049994}
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: 1353453985}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1338525102
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -379,6 +279,106 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &1353453984
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1637996540812124, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
serializedVersion: 5
m_Component:
- component: {fileID: 1353453985}
- component: {fileID: 1353453988}
- component: {fileID: 1353453987}
- component: {fileID: 1353453986}
m_Layer: 0
m_Name: First Person Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1353453985
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4497055787654456, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 1353453984}
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: 1067049996}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1353453986
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114876698896786350, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 1353453984}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: eb172c260d42e4f62945afda50892c0c, type: 3}
m_Name:
m_EditorClassIdentifier:
BackgroundMaterial: {fileID: 2100000, guid: 03ad0130a037647aeb60218f61aca114, type: 2}
--- !u!114 &1353453987
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114963366853050710, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 1353453984}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1742909100, guid: 3a84de5cd0624681b6b6dcd8921d912a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Device: 0
m_PoseSource: 6
m_TrackingType: 0
m_UpdateType: 1
m_UseRelativeTransform: 1
--- !u!20 &1353453988
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 20155940112608238, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 732595306}
m_GameObject: {fileID: 1353453984}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.05
far clip plane: 200
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!1 &1622737808
GameObject:
m_ObjectHideFlags: 0
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="AugmentedImageExampleController.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="AugmentedImageVisualizer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
534 changes: 267 additions & 267 deletions Assets/GoogleARCore/Examples/CloudAnchors/Scenes/CloudAnchors.unity

Large diffs are not rendered by default.

@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ARCoreWorldOriginHelper.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -138,8 +138,8 @@ public void SetWorldOrigin(Transform anchorTransform)
/// Output the closest hit from the camera.
/// Note that the Unity's screen coordinate (0, 0) starts from bottom left.
/// </summary>
/// <param name="x">Horizontal touch position in Unity's screen coordiante.</param>
/// <param name="y">Vertical touch position in Unity's screen coordiante.</param>
/// <param name="x">Horizontal touch position in Unity's screen coordinate.</param>
/// <param name="y">Vertical touch position in Unity's screen coordinate.</param>
/// <param name="filter">A filter bitmask where each set bit in
/// <see cref="TrackableHitFlags"/>
/// represents a category of raycast hits the method call should consider valid.</param>
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ARKitHelper.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="AnchorController.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="CloudAnchorsExampleController.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="CloudAnchorsNetworkManager.cs" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="LocalPlayerController.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="NetworkManagerUIController.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="StarController.cs" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
84 changes: 84 additions & 0 deletions Assets/GoogleARCore/Examples/Common/Materials/PawnTranslucent.mat
@@ -0,0 +1,84 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PawnTranslucent
m_Shader: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
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: 2800000, guid: 34437b0148f014726a3e848394ccd3ce, type: 3}
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
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.559}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Specular: {r: 0, g: 0, b: 0, a: 0}
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="CameraColorRampShader.shader" company="Google LLC">
//
// Copyright 2020 Google LLC. All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="MobileDiffuseWithLightEstimation.shader" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="MobileSpecularWithLightEstimation.cginc" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="OcclusionImageEffect.shader" company="Google LLC">
//
// Copyright 2020 Google LLC. All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="PlaneGrid.shader" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,4 +1,4 @@
// Copyright 2017 Google LLC. All rights reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TransparentShadow.shader" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -0,0 +1,234 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1982771189949738}
m_IsPrefabParent: 1
--- !u!1 &1706911323541906
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4808475426170338}
- component: {fileID: 33885700989680310}
- component: {fileID: 23604301657640070}
- component: {fileID: 64612585084049688}
- component: {fileID: 114029948001014002}
m_Layer: 0
m_Name: ARCore_pawn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1752685467971502
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4429535725600738}
- component: {fileID: 33261814464523216}
- component: {fileID: 23402302240547484}
m_Layer: 0
m_Name: ShadowQuad
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1982771189949738
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4332297762598494}
- component: {fileID: 114451545527201010}
m_Layer: 0
m_Name: ARCoreInstantPlacementPawn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4332297762598494
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1982771189949738}
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: 4808475426170338}
- {fileID: 4429535725600738}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4429535725600738
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1752685467971502}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.4, y: 0.4, z: 0.4}
m_Children: []
m_Father: {fileID: 4332297762598494}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!4 &4808475426170338
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1706911323541906}
m_LocalRotation: {x: 6.123234e-17, y: 1, z: 6.123234e-17, w: -6.123234e-17}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4332297762598494}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23402302240547484
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1752685467971502}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1543111f52ced4f468b402fcf46b850a, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
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!23 &23604301657640070
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1706911323541906}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 323489e10f1294dc09fbdd17ce5eddbd, type: 2}
- {fileID: 2100000, guid: 70896cee61b874ab4bf0c86e9192ba57, type: 2}
- {fileID: 2100000, guid: 497ba9ca2875647c480e107fef5391be, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
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 &33261814464523216
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1752685467971502}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33885700989680310
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1706911323541906}
m_Mesh: {fileID: 4300000, guid: f84456e53845d45738b1156787e9a29a, type: 3}
--- !u!64 &64612585084049688
MeshCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1706911323541906}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 14
m_SkinWidth: 0.01
m_Mesh: {fileID: 4300000, guid: f84456e53845d45738b1156787e9a29a, type: 3}
--- !u!114 &114029948001014002
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1706911323541906}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94237db27a0a14e2094a1f08474520ba, type: 3}
m_Name:
m_EditorClassIdentifier:
HolographicMaterials:
- {fileID: 2100000, guid: 1128ebe9a8e984da085c9c3e31c69d76, type: 2}
- {fileID: 2100000, guid: 1128ebe9a8e984da085c9c3e31c69d76, type: 2}
- {fileID: 2100000, guid: 1128ebe9a8e984da085c9c3e31c69d76, type: 2}
OriginalMaterials:
- {fileID: 2100000, guid: 323489e10f1294dc09fbdd17ce5eddbd, type: 2}
- {fileID: 2100000, guid: 70896cee61b874ab4bf0c86e9192ba57, type: 2}
- {fileID: 2100000, guid: 497ba9ca2875647c480e107fef5391be, type: 2}
--- !u!114 &114451545527201010
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1982771189949738}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f6299f95305af49f0a80367409d4ae26, type: 3}
m_Name:
m_EditorClassIdentifier:
5 changes: 3 additions & 2 deletions Assets/GoogleARCore/Examples/Common/Scripts/DepthEffect.cs
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="DepthEffect.cs" company="Google LLC">
//
// Copyright 2020 Google LLC. All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -182,7 +182,8 @@ public void Update()
_depthMaterial.SetFloat("_TransitionSize", TransitionSize);
Shader.SetGlobalFloat("_BlurSize", BlurSize / BlurDownsample);

if (DepthMenu != null && DepthMenu.IsDepthEnabled())
if (Session.Status == SessionStatus.Tracking && DepthMenu != null &&
DepthMenu.IsDepthEnabled())
{
// Gets the latest depth map from ARCore.
Frame.CameraImage.UpdateDepthTexture(ref _depthTexture);
Expand Down
64 changes: 24 additions & 40 deletions Assets/GoogleARCore/Examples/Common/Scripts/DepthMenu.cs
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="DepthMenu.cs" company="Google LLC">
//
// Copyright 2020 Google LLC. All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -20,9 +20,7 @@

namespace GoogleARCore.Examples.Common
{
using System.Collections.Generic;
using GoogleARCore;
using GoogleARCore.Examples.Common;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
Expand Down Expand Up @@ -55,27 +53,13 @@ public class DepthMenu : MonoBehaviour
[SerializeField]
private Camera _camera = null;

/// <summary>
/// The Menu Window shows the depth configurations.
/// </summary>
[FormerlySerializedAs("m_MenuWindow")]
[SerializeField]
private GameObject _menuWindow = null;

/// <summary>
/// The Depth Card Window.
/// </summary>
[FormerlySerializedAs("m_DepthCardWindow")]
[SerializeField]
private GameObject _depthCardWindow = null;

/// <summary>
/// The button to open the menu window.
/// </summary>
[FormerlySerializedAs("m_MenuButton")]
[SerializeField]
private Button _menuButton = null;

/// <summary>
/// The button to apply the config and close the menu window.
/// </summary>
Expand Down Expand Up @@ -139,8 +123,15 @@ public class DepthMenu : MonoBehaviour
[SerializeField]
private Text _depthMapToggleLabel = null;

/// <summary>
/// Indicates that the session has been configured based on
/// whether the device supports depth.
/// </summary>
private bool _depthConfigured = false;

/// <summary>
/// Indicates what depth state applies to current session.
/// </summary>
private DepthState _depthState = DepthState.DepthNotAvailable;

/// <summary>
Expand Down Expand Up @@ -174,14 +165,12 @@ public enum DepthState
/// </summary>
public void Start()
{
_menuButton.onClick.AddListener(OnMenuButtonClicked);
_applyButton.onClick.AddListener(OnApplyButtonClicked);
_cancelButton.onClick.AddListener(OnCancelButtonClicked);
_enableDepthButton.onClick.AddListener(OnEnableDepthButtonClicked);
_disableDepthButton.onClick.AddListener(OnDisableDepthButtonClicked);
_enableDepthToggle.onValueChanged.AddListener(OnEnableDepthToggleValueChanged);

_menuWindow.SetActive(false);
_depthCardWindow.SetActive(false);
_debugVisualizer.SetActive(false);
}
Expand All @@ -191,7 +180,6 @@ public void Start()
/// </summary>
public void OnDestroy()
{
_menuButton.onClick.RemoveListener(OnMenuButtonClicked);
_applyButton.onClick.RemoveListener(OnApplyButtonClicked);
_cancelButton.onClick.RemoveListener(OnCancelButtonClicked);
_enableDepthButton.onClick.RemoveListener(OnEnableDepthButtonClicked);
Expand All @@ -210,23 +198,19 @@ public void ConfigureDepthBeforePlacingFirstAsset()
// Hence, it would be better NOT to call `IsDepthModeSupported` in start().
if (Session.IsDepthModeSupported(DepthMode.Automatic))
{
_depthState = DepthState.DepthDisabled;
_menuText.text = "Your device supports depth.";
_depthCardWindow.SetActive(true);
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(false);
}
else
{
_depthConfigured = true;
_depthState = DepthState.DepthNotAvailable;
_menuText.text = "Your device doesn't support depth.";
}
}
}

/// <summary>
/// Check whether the user could place asset.
/// </summary>
/// <returns>Whether the user could place asset.</returns>
public bool CanPlaceAsset()
{
return !_depthCardWindow.activeSelf & !_menuWindow.activeSelf;
_depthConfigured = true;
}
}

/// <summary>
Expand All @@ -239,7 +223,10 @@ public bool IsDepthEnabled()
|| _depthState == DepthState.DepthMap;
}

private void OnMenuButtonClicked()
/// <summary>
/// Callback event when the depth menu button is clicked.
/// </summary>
public void OnMenuButtonClicked()
{
if (!_depthConfigured)
{
Expand All @@ -257,10 +244,10 @@ private void OnMenuButtonClicked()
_menuText.text = "Your device doesn't support depth.";
}

ResetToggle();
_depthConfigured = true;
ApplyDepthState();
}

_menuWindow.SetActive(true);
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(false);
}

Expand All @@ -277,29 +264,27 @@ private void OnApplyButtonClicked()
_debugVisualizer.SetActive(false);
}

_menuWindow.SetActive(false);
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(true);
}

private void OnCancelButtonClicked()
{
ResetToggle();
_menuWindow.SetActive(false);
ApplyDepthState();
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(true);
}

private void OnEnableDepthButtonClicked()
{
ConfigureDepth(true);
ResetToggle();
ApplyDepthState();
_depthCardWindow.SetActive(false);
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(true);
}

private void OnDisableDepthButtonClicked()
{
ConfigureDepth(false);
ResetToggle();
ApplyDepthState();
_depthCardWindow.SetActive(false);
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(true);
}
Expand All @@ -322,11 +307,10 @@ private void OnEnableDepthToggleValueChanged(bool enabled)
private void ConfigureDepth(bool depthEnabled)
{
(_camera.GetComponent(typeof(DepthEffect)) as MonoBehaviour).enabled = depthEnabled;
_depthConfigured = true;
_depthState = depthEnabled ? DepthState.DepthEnabled : DepthState.DepthDisabled;
}

private void ResetToggle()
private void ApplyDepthState()
{
switch (_depthState)
{
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="DepthTexture.cs" company="Google LLC">
//
// Copyright 2020 Google LLC. All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="DetectedPlaneGenerator.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="DetectedPlaneVisualizer.cs" company="Google LLC">
//
// Copyright 2017 Google LLC. All Rights Reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
// <copyright file="PointcloudVisualizerEditor.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -45,7 +45,13 @@ public class PointcloudVisualizerEditor : Editor
/// </summary>
public void OnEnable()
{
_script = serializedObject.FindProperty("_script");
_script = serializedObject.FindProperty("m_Script");
if (_script == null)
{
// Early versions of Unity used `_script` instead of `m_Script`.
_script = serializedObject.FindProperty("_script");
}

_pointColor = serializedObject.FindProperty("PointColor");
_defaultSize = serializedObject.FindProperty("_defaultSize");
_maxPointCount = serializedObject.FindProperty("_maxPointCount");
Expand All @@ -62,9 +68,13 @@ public override void OnInspectorGUI()
{
serializedObject.Update();

GUI.enabled = false;
EditorGUILayout.PropertyField(_script, true, new GUILayoutOption[0]);
GUI.enabled = true;
// Only attempt to add built-in srcipt property if it was actually found in OnEnable().
if (_script != null)
{
GUI.enabled = false;
EditorGUILayout.PropertyField(_script, true, new GUILayoutOption[0]);
GUI.enabled = true;
}

var pointcloudVisualizerScript = target as PointcloudVisualizer;

Expand Down
@@ -0,0 +1,90 @@
//-----------------------------------------------------------------------
// <copyright file="InstantPlacementEffect.cs" company="Google LLC">
//
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// </copyright>
//-----------------------------------------------------------------------

namespace GoogleARCore.Examples.Common
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// A component that controls holographic effect on a game object that relies on
/// Instant Placement.
/// </summary>
[RequireComponent(typeof(MeshRenderer))]
public class InstantPlacementEffect : MonoBehaviour
{
/// <summary>
/// The transparent materials and the size should match the original materials.
/// </summary>
public Material[] HolographicMaterials;

/// <summary>
/// The origianl materials used by this game object.
/// </summary>
public Material[] OriginalMaterials;

private bool _isOn = false;

private InstantPlacementPoint _instantPlacementPoint = null;

/// <summary>
/// Initialize the visual effect.
/// </summary>
/// <param name="trackable">The Trackable that's associated to this object.</param>
public void InitializeWithTrackable(Trackable trackable)
{
if (trackable is InstantPlacementPoint)
{
_instantPlacementPoint = trackable as InstantPlacementPoint;
_isOn = _instantPlacementPoint.TrackingMethod !=
InstantPlacementPointTrackingMethod.FullTracking;
}
else
{
_isOn = false;
}

if (_isOn)
{
var renderer = GetComponent<MeshRenderer>();
renderer.materials = HolographicMaterials;
}
}

/// <summary>
/// The Unity Update() method.
/// </summary>
public void Update()
{
if (!_isOn || _instantPlacementPoint == null)
{
return;
}

if (_instantPlacementPoint.TrackingMethod ==
InstantPlacementPointTrackingMethod.FullTracking)
{
GetComponent<MeshRenderer>().materials = OriginalMaterials;
_isOn = false;
}
}
}
}
107 changes: 107 additions & 0 deletions Assets/GoogleARCore/Examples/Common/Scripts/InstantPlacementMenu.cs
@@ -0,0 +1,107 @@
//-----------------------------------------------------------------------
// <copyright file="InstantPlacementMenu.cs" company="Google LLC">
//
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// </copyright>
//-----------------------------------------------------------------------

namespace GoogleARCore.Examples.Common
{
using UnityEngine;
using UnityEngine.UI;

/// <summary>
/// Instant placement setting menu to configure instant placement options in runtime.
/// </summary>
public class InstantPlacementMenu : MonoBehaviour
{
/// <summary>
/// The ARCoreSession component used in this scene.
/// </summary>
[SerializeField]
private ARCoreSession _arCoreSession = null;

/// <summary>
/// Toggle element to configure instant placement mode in runtime.
/// </summary>
[SerializeField]
private Toggle _instantPlacementToggle = null;

/// <summary>
/// The button to apply current settings.
/// </summary>
[SerializeField]
private Button _applyButton = null;

/// <summary>
/// The button to reset current settings.
/// </summary>
[SerializeField]
private Button _cancelButton = null;

/// <summary>
/// Unity's Start() method.
/// </summary>
public void Start()
{
_applyButton.onClick.AddListener(ApplySettings);
_cancelButton.onClick.AddListener(ResetSettings);
}

/// <summary>
/// Unity's OnDestroy() method.
/// </summary>
public void OnDestroy()
{
_applyButton.onClick.RemoveListener(ApplySettings);
_cancelButton.onClick.RemoveListener(ResetSettings);
}

/// <summary>
/// Check whether Instant Placement is current enabled.
/// </summary>
/// <returns><c>true</c> when Instant Placement is enabled,
/// otherwise, returns <c>false</c>.</returns>
public bool IsInstantPlacementEnabled()
{
return _arCoreSession.SessionConfig.InstantPlacementMode !=
InstantPlacementMode.Disabled;
}

private void ApplySettings()
{
if (_instantPlacementToggle == null || _arCoreSession == null)
{
return;
}

var instantPlacementMode = _instantPlacementToggle.isOn ?
InstantPlacementMode.LocalYUp : InstantPlacementMode.Disabled;
_arCoreSession.SessionConfig.InstantPlacementMode = instantPlacementMode;
}

private void ResetSettings()
{
if (_instantPlacementToggle == null || _arCoreSession == null)
{
return;
}

_instantPlacementToggle.isOn =
_arCoreSession.SessionConfig.InstantPlacementMode != InstantPlacementMode.Disabled;
}
}
}
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="PlaneDiscoveryGuide.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
// <copyright file="PointcloudVisualizer.cs" company="Google LLC">
//
// Copyright 2017 Google LLC. All Rights Reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
// <copyright file="RawImageVideoPlayer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
// <copyright file="SafeAreaScaler.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
// <copyright file="ShadowQuadHelper.cs" company="Google LLC">
//
// Copyright 2020 Google LLC. All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions Assets/GoogleARCore/Examples/Common/Textures/translucent.png.meta
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="EdgeDetectionBackground.shader" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
Google ARCore Camera Utility Plugin Source Code
================================================
Copyright 2017 Google LLC. All rights reserved.
Copyright 2017 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
268 changes: 134 additions & 134 deletions Assets/GoogleARCore/Examples/ComputerVision/Scenes/ComputerVision.unity
Expand Up @@ -217,7 +217,7 @@ Prefab:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c10877f7cd5764de18d46d7b777d1faa, type: 2}
m_RootGameObject: {fileID: 268627364}
m_RootGameObject: {fileID: 1067049994}
m_IsPrefabParent: 0
--- !u!1 &177518715
GameObject:
Expand Down Expand Up @@ -355,45 +355,13 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 250960331}
--- !u!1 &268627364
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1772147192650458, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
serializedVersion: 5
m_Component:
- component: {fileID: 268627365}
- component: {fileID: 273323148}
m_Layer: 0
m_Name: ARCore Device
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &268627365
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4442908887562770, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 268627364}
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: 790926325}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &273323148
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114451889682527732, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 268627364}
m_GameObject: {fileID: 1067049994}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d4ca0c6a3af6b4635b7e98c6ea0a0cf9, type: 3}
Expand Down Expand Up @@ -830,106 +798,6 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 771580495}
--- !u!1 &790926324
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1637996540812124, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
serializedVersion: 5
m_Component:
- component: {fileID: 790926325}
- component: {fileID: 790926328}
- component: {fileID: 790926327}
- component: {fileID: 790926326}
m_Layer: 0
m_Name: First Person Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &790926325
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4497055787654456, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 790926324}
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: 268627365}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &790926326
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114876698896786350, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 790926324}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: eb172c260d42e4f62945afda50892c0c, type: 3}
m_Name:
m_EditorClassIdentifier:
BackgroundMaterial: {fileID: 2100000, guid: 03ad0130a037647aeb60218f61aca114, type: 2}
--- !u!114 &790926327
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114963366853050710, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 790926324}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1742909100, guid: 3a84de5cd0624681b6b6dcd8921d912a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Device: 0
m_PoseSource: 6
m_TrackingType: 0
m_UpdateType: 1
m_UseRelativeTransform: 1
--- !u!20 &790926328
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 20155940112608238, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 790926324}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.05
far clip plane: 200
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!1 &830847048
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1256,6 +1124,38 @@ MonoBehaviour:
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &1067049994
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1772147192650458, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
serializedVersion: 5
m_Component:
- component: {fileID: 1067049995}
- component: {fileID: 273323148}
m_Layer: 0
m_Name: ARCore Device
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1067049995
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4442908887562770, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 1067049994}
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: 1353453985}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1256581651
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1436,6 +1336,106 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1326882415}
--- !u!1 &1353453984
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1637996540812124, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
serializedVersion: 5
m_Component:
- component: {fileID: 1353453985}
- component: {fileID: 1353453988}
- component: {fileID: 1353453987}
- component: {fileID: 1353453986}
m_Layer: 0
m_Name: First Person Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1353453985
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4497055787654456, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 1353453984}
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: 1067049995}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1353453986
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114876698896786350, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 1353453984}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: eb172c260d42e4f62945afda50892c0c, type: 3}
m_Name:
m_EditorClassIdentifier:
BackgroundMaterial: {fileID: 2100000, guid: 03ad0130a037647aeb60218f61aca114, type: 2}
--- !u!114 &1353453987
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114963366853050710, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 1353453984}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1742909100, guid: 3a84de5cd0624681b6b6dcd8921d912a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Device: 0
m_PoseSource: 6
m_TrackingType: 0
m_UpdateType: 1
m_UseRelativeTransform: 1
--- !u!20 &1353453988
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 20155940112608238, guid: c10877f7cd5764de18d46d7b777d1faa,
type: 2}
m_PrefabInternal: {fileID: 60865845}
m_GameObject: {fileID: 1353453984}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.05
far clip plane: 200
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!1 &1362374062
GameObject:
m_ObjectHideFlags: 0
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ComputerVisionController.cs" company="Google LLC">
//
// Copyright 2017 Google LLC. All Rights Reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="EdgeDetector.cs" company="Google LLC">
//
// Copyright 2017 Google LLC. All Rights Reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="PointClickHandler.cs" company="Google LLC">
//
// Copyright 2017 Google LLC. All Rights Reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TextureReader.cs" company="Google LLC">
//
// Copyright 2017 Google LLC. All Rights Reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TextureReaderApi.cs" company="Google LLC">
//
// Copyright 2017 Google LLC. All Rights Reserved.
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Expand Up @@ -19,4 +19,4 @@ MonoBehaviour:
CameraFocusMode: 1
AugmentedFaceMode: 0
DepthMode: 1
InstantPlacementMode: 0
InstantPlacementMode: 2
4,490 changes: 3,031 additions & 1,459 deletions Assets/GoogleARCore/Examples/HelloAR/Scenes/HelloAR.unity

Large diffs are not rendered by default.

63 changes: 38 additions & 25 deletions Assets/GoogleARCore/Examples/HelloAR/Scripts/HelloARController.cs
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="HelloARController.cs" company="Google LLC">
//
// Copyright 2020 Google LLC. All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,6 +41,17 @@ public class HelloARController : MonoBehaviour
/// </summary>
public DepthMenu DepthMenu;

/// <summary>
/// The Instant Placement Setting Menu.
/// </summary>
public InstantPlacementMenu InstantPlacementMenu;

/// <summary>
/// A prefab to place when an instant placement raycast from a user touch hits an instant
/// placement point.
/// </summary>
public GameObject InstantPlacementPrefab;

/// <summary>
/// The first-person camera being used to render the passthrough camera image (i.e. AR
/// background).
Expand Down Expand Up @@ -90,11 +101,6 @@ public void Update()
{
UpdateApplicationLifecycle();

if (DepthMenu != null && !DepthMenu.CanPlaceAsset())
{
return;
}

// If the player has not touched the screen, we are done with this update.
Touch touch;
if (Input.touchCount < 1 || (touch = Input.GetTouch(0)).phase != TouchPhase.Began)
Expand All @@ -110,25 +116,21 @@ public void Update()

// Raycast against the location the player touched to search for planes.
TrackableHit hit;
TrackableHitFlags raycastFilter = TrackableHitFlags.PlaneWithinPolygon |
TrackableHitFlags.FeaturePointWithSurfaceNormal;
bool foundHit = false;
if (InstantPlacementMenu.IsInstantPlacementEnabled())
{
foundHit = Frame.RaycastInstantPlacement(
touch.position.x, touch.position.y, 1.0f, out hit);
}
else
{
TrackableHitFlags raycastFilter = TrackableHitFlags.PlaneWithinPolygon |
TrackableHitFlags.FeaturePointWithSurfaceNormal;
foundHit = Frame.Raycast(
touch.position.x, touch.position.y, raycastFilter, out hit);
}

// To use Instant Placement, which supports frame by frame 2D tracking and
// automatically switches to 6DOF tracking once it's available, follow these steps:
// 1. Use InstantPlacementMode.LocalYUp in ARCoreSessionConfig.
// 2. Use Frame.RaycastInstantPlacement(float, float, float, out TrackableHit) method
// with an approximate distance in meters.
// 3. Create anchor with the hit result from previous step by:
// hit.Trackable.CreateAnchor(hit.Pose).
//
// An anchor will be created at the approximate pose if there has been no Trackable
// detected yet, and updates its pose to attach to the real world.
// Note: there may be a noticeable jump in position during this tracking method change.
// Use InstantPlacementPoint.TrackingMethod to customize pose update logic.
//
// See the Instant Placement Developer's Guide at:
// https://developers.google.com/ar/develop/unity/instant-placement.
if (Frame.Raycast(touch.position.x, touch.position.y, raycastFilter, out hit))
if (foundHit)
{
// Use hit pose and camera pose to check if hittest is from the
// back of the plane, if it is, no need to create the anchor.
Expand All @@ -148,7 +150,11 @@ public void Update()

// Choose the prefab based on the Trackable that got hit.
GameObject prefab;
if (hit.Trackable is FeaturePoint)
if (hit.Trackable is InstantPlacementPoint)
{
prefab = InstantPlacementPrefab;
}
else if (hit.Trackable is FeaturePoint)
{
prefab = GameObjectPointPrefab;
}
Expand Down Expand Up @@ -182,6 +188,13 @@ public void Update()

// Make game object a child of the anchor.
gameObject.transform.parent = anchor.transform;

// Initialize Instant Placement Effect.
if (hit.Trackable is InstantPlacementPoint)
{
gameObject.GetComponentInChildren<InstantPlacementEffect>()
.InitializeWithTrackable(hit.Trackable);
}
}
}
}
Expand Down
164 changes: 164 additions & 0 deletions Assets/GoogleARCore/Examples/HelloAR/Scripts/SettingsMenu.cs
@@ -0,0 +1,164 @@
//-----------------------------------------------------------------------
// <copyright file="SettingsMenu.cs" company="Google LLC">
//
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// </copyright>
//-----------------------------------------------------------------------

namespace GoogleARCore.Examples.HelloAR
{
using GoogleARCore.Examples.Common;
using UnityEngine;
using UnityEngine.UI;

/// <summary>
/// Setting menu for Hello AR Sample, including settings for different features.
/// </summary>
public class SettingsMenu : MonoBehaviour
{
[Header("Common Settings")]

/// <summary>
/// Scene object that contains all setting menu UI elements.
/// </summary>
[SerializeField]
private GameObject _menuWindow = null;

/// <summary>
/// Setting menu that contains options for different features.
/// </summary>
[SerializeField]
private GameObject _settingMenuUi = null;

/// <summary>
/// Setting button for opening menu windows.
/// </summary>
[SerializeField]
private Button _settingButton = null;

/// <summary>
/// The plane discovery guide visuals that guide users to scan surroundings
/// and discover planes.
/// </summary>
[SerializeField]
private PlaneDiscoveryGuide _planeDiscoveryGuide = null;

[Header("Depth Settings")]

/// <summary>
/// Depth setting menu that is used for configuring depth options.
/// </summary>
[SerializeField]
private GameObject _depthMenuUi = null;

/// <summary>
/// The button to open depth menu.
/// </summary>
[SerializeField]
private Button _depthButton = null;

/// <summary>
/// The component to control depth menu.
/// </summary>
[SerializeField]
private DepthMenu _depthMenu = null;

[Header("Instant Placement Settings")]

/// <summary>
/// Instant Placement menu for configuring instant placement options.
/// </summary>
[SerializeField]
private GameObject _instantPlacementMenuUi = null;

/// <summary>
/// The button to open instant placement menu.
/// </summary>
[SerializeField]
private Button _instantPlacementButton = null;

/// <summary>
/// Unity's Start() method.
/// </summary>
public void Start()
{
_menuWindow.SetActive(false);
_settingMenuUi.SetActive(false);
_settingButton.onClick.AddListener(OnMenuButtonClick);

_depthMenuUi.SetActive(false);
_depthButton.onClick.AddListener(OnClickDepthMenu);
_instantPlacementMenuUi.SetActive(false);
_instantPlacementButton.onClick.AddListener(OnClickInstantPlacementMenu);
}

/// <summary>
/// Unity's OnDestroy() method.
/// </summary>
public void OnDestroy()
{
_settingButton.onClick.RemoveListener(OnMenuButtonClick);
_depthButton.onClick.RemoveListener(OnClickDepthMenu);
_instantPlacementButton.onClick.RemoveListener(OnClickInstantPlacementMenu);
}

/// <summary>
/// Callback event for closing the setting menu.
/// </summary>
public void OnMenuClosed()
{
_menuWindow.SetActive(false);
_settingMenuUi.SetActive(false);
_depthMenuUi.SetActive(false);
_instantPlacementMenuUi.SetActive(false);
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(true);
}

/// <summary>
/// Callback event for option button.
/// </summary>
private void OnMenuButtonClick()
{
_menuWindow.SetActive(true);
#if ARCORE_FEATURE_INSTANT_PLACEMENT // Both Dpeth and IP are enabled.
_settingMenuUi.SetActive(true);
#else // Only Depth is enabled.
_depthMenuUi.SetActive(true);
_depthMenu.OnMenuButtonClicked();
#endif
_planeDiscoveryGuide.EnablePlaneDiscoveryGuide(false);
}

/// <summary>
/// Callback event for opening depth menu.
/// </summary>
private void OnClickDepthMenu()
{
_settingMenuUi.SetActive(false);
_depthMenuUi.SetActive(true);
_depthMenu.OnMenuButtonClicked();
}

/// <summary>
/// Callback event for opening instant placement menu.
/// </summary>
private void OnClickInstantPlacementMenu()
{
_settingMenuUi.SetActive(false);
_instantPlacementMenuUi.SetActive(true);
}
}
}
11 changes: 11 additions & 0 deletions Assets/GoogleARCore/Examples/HelloAR/Scripts/SettingsMenu.cs.meta
2,316 changes: 1,158 additions & 1,158 deletions Assets/GoogleARCore/Examples/ObjectManipulation/Scenes/ObjectManipulation.unity

Large diffs are not rendered by default.

@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="DragGesture.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="DragGestureRecognizer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="Gesture.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="GestureRecognizer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="GestureTouchesUtility.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="PinchGesture.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="PinchGestureRecognizer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TapGesture.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TapGestureRecognizer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TransformationUtility.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TwistGesture.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TwistGestureRecognizer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TwoFingerDragGesture.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TwoFingerDragGestureRecognizer.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ManipulationSystem.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ElevationManipulator.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="Manipulator.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="RotationManipulator.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ScaleManipulator.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="SelectionManipulator.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="TranslationManipulator.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="ObjectManipulationController.cs" company="Google LLC">
//
// Copyright 2018 Google LLC. All Rights Reserved.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="PawnManipulator.cs" company="Google LLC">
//
// Copyright 2019 Google LLC. All Rights Reserved.
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
8 changes: 8 additions & 0 deletions Assets/GoogleARCore/Examples/PersistentCloudAnchors.meta
@@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 53ac32fab2599402fb6d154adf4c1e40, type: 3}
m_Name: PersistentCloudAnchorsSessionConfig
m_EditorClassIdentifier:
MatchCameraFramerate: 1
PlaneFindingMode: 1
LightEstimationMode: 3
CloudAnchorMode: 1
AugmentedImageDatabase: {fileID: 0}
CameraFocusMode: 0
AugmentedFaceMode: 0
DepthMode: 0
InstantPlacementMode: 0
@@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: CircleLineMaterial
m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
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: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _TintColor: {r: 1, g: 1, b: 1, a: 1}

Large diffs are not rendered by default.