diff --git a/Assets/GoogleARCore/Editor/ARCoreiOSDependencies.template b/Assets/GoogleARCore/Editor/ARCoreiOSDependencies.template
index 193ba73c..0bc7faee 100644
--- a/Assets/GoogleARCore/Editor/ARCoreiOSDependencies.template
+++ b/Assets/GoogleARCore/Editor/ARCoreiOSDependencies.template
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AumgnetedFaceSessionConfiguration.asset b/Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AugmentedFaceSessionConfiguration.asset
similarity index 92%
rename from Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AumgnetedFaceSessionConfiguration.asset
rename to Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AugmentedFaceSessionConfiguration.asset
index fe1a1081..3da208a5 100644
--- a/Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AumgnetedFaceSessionConfiguration.asset
+++ b/Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AugmentedFaceSessionConfiguration.asset
@@ -9,7 +9,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 53ac32fab2599402fb6d154adf4c1e40, type: 3}
- m_Name: AumgnetedFaceSessionConfiguration
+ m_Name: AugmentedFaceSessionConfiguration
m_EditorClassIdentifier:
MatchCameraFramerate: 1
PlaneFindingMode: 0
diff --git a/Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AumgnetedFaceSessionConfiguration.asset.meta b/Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AugmentedFaceSessionConfiguration.asset.meta
similarity index 100%
rename from Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AumgnetedFaceSessionConfiguration.asset.meta
rename to Assets/GoogleARCore/Examples/AugmentedFaces/Configurations/AugmentedFaceSessionConfiguration.asset.meta
diff --git a/Assets/GoogleARCore/Examples/AugmentedImage/Scripts/AugmentedImageExampleController.cs b/Assets/GoogleARCore/Examples/AugmentedImage/Scripts/AugmentedImageExampleController.cs
index 39832df9..5c4a1d35 100644
--- a/Assets/GoogleARCore/Examples/AugmentedImage/Scripts/AugmentedImageExampleController.cs
+++ b/Assets/GoogleARCore/Examples/AugmentedImage/Scripts/AugmentedImageExampleController.cs
@@ -29,6 +29,15 @@ namespace GoogleARCore.Examples.AugmentedImage
///
/// Controller for AugmentedImage example.
///
+ ///
+ /// In this sample, we assume all images are static or moving slowly with
+ /// a large occupation of the screen. If the target is actively moving,
+ /// we recommend to check and
+ /// render only when the tracking method equals to
+ /// .
+ /// See details in
+ /// Recognize and Augment Images
+ ///
public class AugmentedImageExampleController : MonoBehaviour
{
///
@@ -57,12 +66,6 @@ public void Update()
Application.Quit();
}
- // Check that motion tracking is tracking.
- if (Session.Status != SessionStatus.Tracking)
- {
- return;
- }
-
// Get updated augmented images for this frame.
Session.GetTrackables(
m_TempAugmentedImages, TrackableQueryFilter.Updated);
diff --git a/Assets/GoogleARCore/Examples/CloudAnchors/Scripts/CloudAnchorsExampleController.cs b/Assets/GoogleARCore/Examples/CloudAnchors/Scripts/CloudAnchorsExampleController.cs
index fe6aa258..0140580b 100644
--- a/Assets/GoogleARCore/Examples/CloudAnchors/Scripts/CloudAnchorsExampleController.cs
+++ b/Assets/GoogleARCore/Examples/CloudAnchors/Scripts/CloudAnchorsExampleController.cs
@@ -24,6 +24,11 @@ namespace GoogleARCore.Examples.CloudAnchors
using UnityEngine;
using UnityEngine.Networking;
+#if UNITY_EDITOR
+ // Set up touch input propagation while using Instant Preview in the editor.
+ using Input = GoogleARCore.InstantPreviewInput;
+#endif
+
///
/// Controller for the Cloud Anchors Example. Handles the ARCore lifecycle.
///
diff --git a/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/DragGesture.cs b/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/DragGesture.cs
index d6a99fd6..4a9258fb 100644
--- a/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/DragGesture.cs
+++ b/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/DragGesture.cs
@@ -23,6 +23,11 @@ namespace GoogleARCore.Examples.ObjectManipulation
using GoogleARCore.Examples.ObjectManipulationInternal;
using UnityEngine;
+#if UNITY_EDITOR
+ // Set up touch input propagation while using Instant Preview in the editor.
+ using Input = GoogleARCore.InstantPreviewInput;
+#endif
+
///
/// Gesture for when the user performs a drag motion on the touch screen.
///
diff --git a/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureRecognizer.cs b/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureRecognizer.cs
index c6d59d22..267e6fef 100644
--- a/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureRecognizer.cs
+++ b/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureRecognizer.cs
@@ -24,6 +24,11 @@ namespace GoogleARCore.Examples.ObjectManipulationInternal
using System.Collections.Generic;
using UnityEngine;
+#if UNITY_EDITOR
+ // Set up touch input propagation while using Instant Preview in the editor.
+ using Input = GoogleARCore.InstantPreviewInput;
+#endif
+
///
/// Base class for all Gesture Recognizers (i.e. TapGestureRecognizer).
///
diff --git a/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureTouchesUtility.cs b/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureTouchesUtility.cs
index 12f11842..b0281b07 100644
--- a/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureTouchesUtility.cs
+++ b/Assets/GoogleARCore/Examples/ObjectManipulation/Scripts/Gestures/GestureTouchesUtility.cs
@@ -23,6 +23,11 @@ namespace GoogleARCore.Examples.ObjectManipulationInternal
using System.Collections.Generic;
using UnityEngine;
+#if UNITY_EDITOR
+ // Set up touch input propagation while using Instant Preview in the editor.
+ using Input = GoogleARCore.InstantPreviewInput;
+#endif
+
///
/// Singleton used by Gesture's and GestureRecognizer's to interact with touch input.
///
diff --git a/Assets/GoogleARCore/LICENSE b/Assets/GoogleARCore/LICENSE
index 99313e1b..5b468c05 100644
--- a/Assets/GoogleARCore/LICENSE
+++ b/Assets/GoogleARCore/LICENSE
@@ -1,4 +1,18 @@
-Except as indicated at the end of this LICENSE file,
+===============================================================================
+
+All files in the following folders:
+- Assets/GoogleARCore/SDK/Plugins/
+- Assets/GoogleARCore/SDK/InstantPreview/Plugins/
+- Assets/PlayServicesResolver/
+
+are licensed as follows:
+
+Covered by the **Google APIs Terms of Service** at
+[https://developers.google.com/terms/](https://developers.google.com/terms/)
+
+===============================================================================
+
+Except as indicated previously in this LICENSE file
files in this SDK are licensed as follows:
Copyright (c) 2017, Google Inc.
@@ -160,14 +174,27 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
-===============================================================================
+APPENDIX: How to apply the Apache License to your work.
-All files in the following folders:
-- Assets/GoogleARCore/SDK/Plugins/
-- Assets/GoogleARCore/SDK/InstantPreview/Plugins/
-- Assets/PlayServicesResolver/
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
-are licensed as follows:
+Copyright [yyyy] [name of copyright owner]
-Covered by the **Google APIs Terms of Service** at
-[https://developers.google.com/terms/](https://developers.google.com/terms/)
+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
+
+ https://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.
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_shared.dll b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_shared.dll
deleted file mode 100644
index 4291e532..00000000
Binary files a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_shared.dll and /dev/null differ
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_shared.dll.meta b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_shared.dll.meta
deleted file mode 100644
index 83c96cfa..00000000
--- a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_shared.dll.meta
+++ /dev/null
@@ -1,85 +0,0 @@
-fileFormatVersion: 2
-guid: 616594e174350438498fe4c1f3678ff5
-PluginImporter:
- externalObjects: {}
- serializedVersion: 2
- iconMap: {}
- executionOrder: {}
- isPreloaded: 0
- isOverridable: 0
- platformData:
- - first:
- '': OSXIntel
- second:
- enabled: 0
- settings:
- CPU: None
- - first:
- '': OSXIntel64
- second:
- enabled: 1
- settings:
- CPU: AnyCPU
- - first:
- Any:
- second:
- enabled: 1
- settings: {}
- - first:
- Editor: Editor
- second:
- enabled: 0
- settings:
- CPU: x86_64
- DefaultValueInitialized: true
- - first:
- Facebook: Win
- second:
- enabled: 0
- settings:
- CPU: None
- - first:
- Facebook: Win64
- second:
- enabled: 1
- settings:
- CPU: AnyCPU
- - first:
- Standalone: Linux
- second:
- enabled: 0
- settings:
- CPU: None
- - first:
- Standalone: Linux64
- second:
- enabled: 1
- settings:
- CPU: x86_64
- - first:
- Standalone: LinuxUniversal
- second:
- enabled: 1
- settings:
- CPU: x86_64
- - first:
- Standalone: OSXUniversal
- second:
- enabled: 0
- settings:
- CPU: x86_64
- - first:
- Standalone: Win
- second:
- enabled: 0
- settings:
- CPU: None
- - first:
- Standalone: Win64
- second:
- enabled: 1
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/Info.plist b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/Info.plist
new file mode 100644
index 00000000..fd419519
Binary files /dev/null and b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/Info.plist differ
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/libarcore_instant_preview_shared.dylib.meta b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/Info.plist.meta
similarity index 59%
rename from Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/libarcore_instant_preview_shared.dylib.meta
rename to Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/Info.plist.meta
index 481ccf42..815eb83f 100644
--- a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/libarcore_instant_preview_shared.dylib.meta
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/Info.plist.meta
@@ -1,7 +1,5 @@
fileFormatVersion: 2
-guid: 9a49dee3272c24e7794351bb17e92bd3
-timeCreated: 1516418595
-licenseType: Pro
+guid: 966651f6c7e544ebcae4633f6fdb7feb
DefaultImporter:
externalObjects: {}
userData:
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/arcore_instant_preview_unity_plugin b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/arcore_instant_preview_unity_plugin
index d3e262af..3ccadab4 100644
Binary files a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/arcore_instant_preview_unity_plugin and b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/arcore_instant_preview_unity_plugin differ
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/libarcore_instant_preview_shared.dylib b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/libarcore_instant_preview_shared.dylib
deleted file mode 100644
index 5c90346d..00000000
Binary files a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/MacOS/libarcore_instant_preview_shared.dylib and /dev/null differ
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Prefabs.meta b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature.meta
similarity index 77%
rename from Assets/GoogleARCore/SDK/InstantPreview/Prefabs.meta
rename to Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature.meta
index 107fd018..8416118e 100644
--- a/Assets/GoogleARCore/SDK/InstantPreview/Prefabs.meta
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: b0e7a96cab0f246b787b9b6f259c4ee4
+guid: 483bb33e079b54edcbd666027fa35e5b
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature/CodeResources b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature/CodeResources
new file mode 100644
index 00000000..d5d0fd74
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,115 @@
+
+
+
+
+ files
+
+ files2
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Prefabs/Instant Preview Touch Warning.prefab.meta b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature/CodeResources.meta
similarity index 52%
rename from Assets/GoogleARCore/SDK/InstantPreview/Prefabs/Instant Preview Touch Warning.prefab.meta
rename to Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature/CodeResources.meta
index 82b5b851..c4c86268 100644
--- a/Assets/GoogleARCore/SDK/InstantPreview/Prefabs/Instant Preview Touch Warning.prefab.meta
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.bundle/Contents/_CodeSignature/CodeResources.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
-guid: 62e7602029e324dd893c54ee57ae6313
-NativeFormatImporter:
+guid: 69a7b3e4f075242749e8e3cd68db2bd0
+DefaultImporter:
externalObjects: {}
- mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.dll b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.dll
index 60754ceb..7e4fc1f1 100644
Binary files a/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.dll and b/Assets/GoogleARCore/SDK/InstantPreview/Plugins/x86_64/arcore_instant_preview_unity_plugin.dll differ
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Prefabs/Instant Preview Touch Warning.prefab b/Assets/GoogleARCore/SDK/InstantPreview/Prefabs/Instant Preview Touch Warning.prefab
deleted file mode 100644
index c84c8384..00000000
--- a/Assets/GoogleARCore/SDK/InstantPreview/Prefabs/Instant Preview Touch Warning.prefab
+++ /dev/null
@@ -1,283 +0,0 @@
-%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: 1845938665141168}
- m_IsPrefabParent: 1
---- !u!1 &1108490924331886
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 224120390396454698}
- - component: {fileID: 222153740956011548}
- - component: {fileID: 114072129801608580}
- - component: {fileID: 114664355325595546}
- - component: {fileID: 114779258989065280}
- m_Layer: 5
- m_Name: Instant Preview Warning Panel
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!1 &1152215335319754
-GameObject:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 224590085720819846}
- - component: {fileID: 222765077690437448}
- - component: {fileID: 114233141015191404}
- m_Layer: 5
- m_Name: Instant Preview Warning Text
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!1 &1845938665141168
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 224364306655574080}
- - component: {fileID: 223223088262075982}
- - component: {fileID: 114183560767606254}
- - component: {fileID: 114103701985220900}
- m_Layer: 5
- m_Name: Instant Preview Touch Warning
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &114072129801608580
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1108490924331886}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 0, g: 0, b: 0, a: 0.392}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_Sprite: {fileID: 10907, 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
---- !u!114 &114103701985220900
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1845938665141168}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 628c1557684bc4a77989e56c31c15aa3, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- ShowEditorWarning: 1
---- !u!114 &114183560767606254
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1845938665141168}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, 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!114 &114233141015191404
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1152215335319754}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_RaycastTarget: 0
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_FontData:
- m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
- m_FontSize: 72
- m_FontStyle: 0
- m_BestFit: 0
- m_MinSize: 0
- m_MaxSize: 200
- m_Alignment: 7
- m_AlignByGeometry: 0
- m_RichText: 1
- m_HorizontalOverflow: 0
- m_VerticalOverflow: 1
- m_LineSpacing: 1
- m_Text: Instant Preview has limited support for touch based input
---- !u!114 &114664355325595546
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1108490924331886}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Padding:
- m_Left: 10
- m_Right: 10
- m_Top: 10
- m_Bottom: 10
- m_ChildAlignment: 7
- m_Spacing: 0
- m_ChildForceExpandWidth: 0
- m_ChildForceExpandHeight: 0
- m_ChildControlWidth: 1
- m_ChildControlHeight: 1
---- !u!114 &114779258989065280
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1108490924331886}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_HorizontalFit: 0
- m_VerticalFit: 2
---- !u!222 &222153740956011548
-CanvasRenderer:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1108490924331886}
---- !u!222 &222765077690437448
-CanvasRenderer:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1152215335319754}
---- !u!223 &223223088262075982
-Canvas:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1845938665141168}
- 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: 32767
- m_TargetDisplay: 0
---- !u!224 &224120390396454698
-RectTransform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1108490924331886}
- 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: 224590085720819846}
- m_Father: {fileID: 224364306655574080}
- 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}
---- !u!224 &224364306655574080
-RectTransform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1845938665141168}
- 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: 224120390396454698}
- m_Father: {fileID: 0}
- m_RootOrder: 0
- 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!224 &224590085720819846
-RectTransform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 1152215335319754}
- 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: 224120390396454698}
- m_RootOrder: 0
- 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.5, y: 0.5}
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor.meta b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor.meta
new file mode 100644
index 00000000..445f6057
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a26e23015768945378e2823d4368f25e
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor/InstantPreviewBugReport.cs b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor/InstantPreviewBugReport.cs
new file mode 100644
index 00000000..db9d0899
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor/InstantPreviewBugReport.cs
@@ -0,0 +1,270 @@
+//-----------------------------------------------------------------------
+//
+//
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// 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.
+//
+//
+//-----------------------------------------------------------------------
+
+namespace GoogleARCoreInternal
+{
+ using System;
+ using System.IO;
+ using System.Runtime.InteropServices;
+ using System.Text;
+ using UnityEditor;
+ using UnityEngine;
+
+ internal static class InstantPreviewBugReport
+ {
+ private const string k_FileNamePrefix = "arcore_unity_editor_bug_report_";
+
+ [MenuItem("Help/Capture ARCore Bug Report")]
+ private static void CaptureBugReport()
+ {
+ string desktopPath = Environment.GetFolderPath(
+ Environment.SpecialFolder.Desktop);
+ DateTime timeStamp = DateTime.Now;
+ string fileNameTimestamp = timeStamp.ToString("yyyyMMdd_hhmmss");
+ string filePath = Path.Combine(
+ desktopPath, k_FileNamePrefix + fileNameTimestamp + ".txt");
+ StreamWriter writer;
+
+ // Operating system and hardware info have to be handled separately based on OS
+ switch (SystemInfo.operatingSystemFamily)
+ {
+ case OperatingSystemFamily.MacOSX:
+ writer = File.CreateText(filePath);
+
+ writer.WriteLine("*** GOOGLE ARCORE SDK FOR UNITY OSX BUG REPORT ***");
+ writer.WriteLine("Timestamp: " + timeStamp.ToString());
+
+ writer.WriteLine();
+ writer.WriteLine("*** OPERATING SYSTEM INFORMATION ***");
+ WriteCommand("system_profiler", "SPSoftwareDataType", writer);
+
+ writer.WriteLine("*** GRAPHICS INFORMATION ***");
+ WriteCommand("system_profiler", "SPDisplaysDataType", writer);
+
+ WriteOsIndependentFields(writer);
+
+ string stdOut;
+ string stdErr;
+
+ // Get PATH directories to search for adb in.
+ ShellHelper.RunCommand(
+ "/bin/bash", "-c -l \"echo $PATH\"", out stdOut, out stdErr);
+ stdOut.Trim();
+
+ writer.WriteLine("*** ADB VERSIONS ON PATH ***");
+ WriteAdbPathVersions(stdOut.Split(':'), writer);
+
+ writer.WriteLine("*** TYPE -A ADB ***");
+ WriteCommand("/bin/bash", "-c -l \"type -a adb\"", writer);
+
+ writer.WriteLine("*** RUNNING ADB PROCESSES ***");
+ WriteCommand(
+ "/bin/bash", "-c -l \"ps -ef | grep -i adb | grep -v grep\"", writer);
+
+ writer.WriteLine("*** RUNNING UNITY PROCESSES ***");
+ WriteCommand(
+ "/bin/bash", "-c -l \"ps -ef | grep -i Unity | grep -v grep\"", writer);
+
+ writer.Close();
+
+ Debug.Log(
+ "ARCore bug report captured. File can be found here:\n" +
+ Path.GetFullPath(filePath));
+ break;
+
+ case OperatingSystemFamily.Windows:
+ writer = File.CreateText(filePath);
+
+ writer.WriteLine("*** GOOGLE ARCORE SDK FOR UNITY WINDOWS BUG REPORT ***");
+ writer.WriteLine("Timestamp: " + timeStamp.ToString());
+
+ writer.WriteLine("*** OPERATING SYSTEM INFORMATION ***");
+ WriteCommand("cmd.exe", "/C systeminfo", writer);
+
+ writer.WriteLine("*** GRAPHICS INFORMATION ***");
+ WriteCommand(
+ "cmd.exe", "/C wmic path win32_VideoController get /format:list", writer);
+
+ WriteOsIndependentFields(writer);
+
+ string pathStr = Environment.GetEnvironmentVariable("PATH").Trim();
+
+ writer.WriteLine("*** ADB VERSIONS ON PATH ***");
+ WriteAdbPathVersions(pathStr.Split(';'), writer);
+
+ writer.WriteLine("*** RUNNING ADB PROCESSES ***");
+ WriteCommand("cmd.exe",
+ "/C TASKLIST | c:\\Windows\\System32\\findstr.exe \"adb\"", writer);
+
+ writer.WriteLine("*** RUNNING UNITY PROCESSES ***");
+ WriteCommand("cmd.exe",
+ "/C TASKLIST | c:\\Windows\\System32\\findstr.exe \"Unity\"", writer);
+
+ writer.Close();
+
+ Debug.Log(
+ "ARCore bug report captured. File can be found here:\n" +
+ Path.GetFullPath(filePath));
+ break;
+ default:
+ // TODO(b/128345421): Implement windows bug report
+ string dialogMessage = "ARCore does not support capturing bug reports for " +
+ SystemInfo.operatingSystemFamily + " at this time.";
+
+ EditorUtility.DisplayDialog("ARCore Bug Report", dialogMessage, "OK");
+ break;
+ }
+ }
+
+ // Writes the fields that don't have to be handled differently based on Operating System
+ private static void WriteOsIndependentFields(StreamWriter writer)
+ {
+ writer.WriteLine("*** UNITY VERSION ***");
+ writer.WriteLine(Application.unityVersion);
+ writer.WriteLine();
+
+ writer.WriteLine("*** UNITY RUNTIME PLATFORM ***");
+ writer.WriteLine(Application.platform);
+ writer.WriteLine();
+
+ writer.WriteLine("*** ARCORE SDK FOR UNITY VERSION ***");
+ writer.WriteLine(GoogleARCore.VersionInfo.Version);
+ writer.WriteLine();
+
+ // Can be null
+ string adbPath = ShellHelper.GetAdbPath();
+
+ writer.WriteLine("*** ARCORE APP VERSION ***");
+ WritePackageVersionString(adbPath, "com.google.ar.core", writer);
+
+ writer.WriteLine("*** INSTANT PREVIEW APP VERSION ***");
+ WritePackageVersionString(adbPath, "com.google.ar.core.instantpreview", writer);
+
+ StringBuilder instantPreviewPluginVer = new StringBuilder(64);
+
+ // Get Instant preview version by running the server.
+ NativeApi.InitializeInstantPreview(
+ adbPath, instantPreviewPluginVer, instantPreviewPluginVer.Capacity);
+
+ writer.WriteLine("*** INSTANT PREVIEW PLUGIN VERSION ***");
+ writer.WriteLine(instantPreviewPluginVer);
+ writer.WriteLine();
+
+ writer.WriteLine("*** ADB DEVICES ***");
+ WriteCommand(adbPath, "devices -l", writer);
+
+ writer.WriteLine("*** DEVICE FINGERPRINT ***");
+ WriteCommand(adbPath, "shell getprop ro.build.fingerprint", writer);
+
+ writer.WriteLine("*** ADB VERSION USED BY UNITY ***");
+ WriteCommand(adbPath, "version", writer);
+ }
+
+ private static void WriteAdbPathVersions(string[] pathDirs, StreamWriter writer)
+ {
+ // Search through directories in PATH to find the version of adb used from PATH
+ foreach (var path in pathDirs)
+ {
+ string fullAdbPath = Path.Combine(path, ShellHelper.GetAdbFileName());
+ if (File.Exists(fullAdbPath))
+ {
+ WriteCommand(fullAdbPath, "version", writer);
+ }
+ }
+ }
+
+ private static void WriteCommand(string program, string arguments, StreamWriter writer)
+ {
+ if (string.IsNullOrEmpty(program))
+ {
+ writer.WriteLine("error: program path was null");
+ }
+ else
+ {
+ string stdOut;
+ string stdErr;
+
+ ShellHelper.RunCommand(program, arguments, out stdOut, out stdErr);
+
+ if (!string.IsNullOrEmpty(stdOut))
+ {
+ writer.WriteLine(stdOut);
+ }
+
+ if (!string.IsNullOrEmpty(stdErr))
+ {
+ writer.WriteLine(stdErr);
+ }
+ }
+
+ writer.WriteLine();
+ }
+
+ private static void WritePackageVersionString(
+ string adbPath, string package, StreamWriter writer)
+ {
+ if (string.IsNullOrEmpty(adbPath))
+ {
+ writer.WriteLine("error: adb path was null");
+ }
+ else
+ {
+ string stdOut;
+ string stdErr;
+ string arguments = "shell pm dump " + package + " | " +
+ "egrep -m 1 -i 'versionName' | sed -n 's/.*versionName=//p'";
+
+ ShellHelper.RunCommand(adbPath, arguments, out stdOut, out stdErr);
+
+ // If stdOut is populated, the device is connected and the app is installed
+ if (!string.IsNullOrEmpty(stdOut))
+ {
+ writer.WriteLine(stdOut);
+ }
+ else
+ {
+ // If stdErr isn't empty, then either the device isn't connected or something
+ // else went wrong, such as adb not being installed.
+ if (!string.IsNullOrEmpty(stdErr))
+ {
+ writer.WriteLine(stdErr);
+ }
+ else
+ {
+ // If stdErr is empty, then the device is connected and the app isn't
+ // installed
+ writer.WriteLine(package + " is not installed on device");
+ }
+ }
+ }
+
+ writer.WriteLine();
+ }
+
+ private struct NativeApi
+ {
+#pragma warning disable 626
+ [DllImport(InstantPreviewManager.InstantPreviewNativeApi)]
+ public static extern bool InitializeInstantPreview(
+ string adbPath, StringBuilder version, int versionStringLength);
+#pragma warning restore 626
+ }
+ }
+}
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewWarning.cs.meta b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor/InstantPreviewBugReport.cs.meta
similarity index 83%
rename from Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewWarning.cs.meta
rename to Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor/InstantPreviewBugReport.cs.meta
index 309c93d7..304593e5 100644
--- a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewWarning.cs.meta
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/Editor/InstantPreviewBugReport.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 628c1557684bc4a77989e56c31c15aa3
+guid: c8ce63f0eabcb485281b24481f956715
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreview.apk b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreview.apk
index e900d845..fae69e06 100644
Binary files a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreview.apk and b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreview.apk differ
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewInput.cs b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewInput.cs
index a5523193..410784aa 100644
--- a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewInput.cs
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewInput.cs
@@ -59,6 +59,7 @@ public static Touch[] touches
{
get
{
+ NativeApi.UnityGotTouches();
return s_Touches;
}
}
@@ -238,6 +239,9 @@ private struct NativeApi
{
[DllImport(InstantPreviewManager.InstantPreviewNativeApi)]
public static extern void GetTouches(out IntPtr touches, out int count);
+
+ [DllImport(InstantPreviewManager.InstantPreviewNativeApi)]
+ public static extern void UnityGotTouches();
}
}
}
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewManager.cs b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewManager.cs
index 50d07df6..0adb7141 100644
--- a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewManager.cs
+++ b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewManager.cs
@@ -55,12 +55,6 @@ public static class InstantPreviewManager
///
public const string InstantPreviewNativeApi = "arcore_instant_preview_unity_plugin";
- ///
- /// Location of the Instant Preview warning prefab.
- ///
- public const string InstantPreviewWarningPrefabPath =
- "Assets/GoogleARCore/SDK/InstantPreview/Prefabs/Instant Preview Touch Warning.prefab";
-
// Guid is taken from meta file and should never change.
private const string k_ApkGuid = "cf7b10762fe921e40a18151a6c92a8a6";
private const string k_NoDevicesFoundAdbResult = "error: no devices/emulators found";
@@ -71,10 +65,23 @@ public static class InstantPreviewManager
" To avoid distorted preview while using Instant Preview, set the Game view Aspect " +
"to match the camera texture resolution ({2}x{3}).";
+ private const string k_InstantPreviewInputWarning =
+ "Touch ignored. Make sure your script contains `using Input = InstantPreviewInput;` " +
+ "when using editor Play mode.\nTo learn more, see " +
+ "https://developers.google.com/ar/develop/unity/instant-preview";
+
+ private const string k_WarningToastFormat = "Instant Preview is not able to {0}. See " +
+ "Unity console.";
+
+ private const int k_WarningThrottleTimeSeconds = 5;
+
private const float k_UnknownGameViewScale = (float)Single.MinValue;
private static readonly WaitForEndOfFrame k_WaitForEndOfFrame = new WaitForEndOfFrame();
+ private static Dictionary s_SentWarnings =
+ new Dictionary();
+
///
/// Gets a value indicating whether Instant Preview is providing the ARCore platform for the
/// current environment.
@@ -98,6 +105,15 @@ public static void LogLimitedSupportMessage(string featureName)
Debug.LogErrorFormat(
"Attempted to {0} which is not yet supported by Instant Preview.\n" +
"Please build and run on device to use this feature.", featureName);
+
+ if (!s_SentWarnings.ContainsKey(featureName) ||
+ (DateTime.UtcNow - s_SentWarnings[featureName]).TotalSeconds >=
+ k_WarningThrottleTimeSeconds)
+ {
+ string warning = string.Format(k_WarningToastFormat, featureName);
+ NativeApi.SendToast(warning);
+ s_SentWarnings[featureName] = DateTime.UtcNow;
+ }
}
///
@@ -174,7 +190,7 @@ public static IEnumerator InitializeIfNeeded()
}
#endif
- var adbPath = InstantPreviewManager.GetAdbPath();
+ var adbPath = ShellHelper.GetAdbPath();
if (adbPath == null)
{
Debug.LogError("Instant Preview requires your Unity Android SDK path to be set. " +
@@ -259,18 +275,6 @@ private static IEnumerator UpdateLoop(string adbPath)
RenderTexture targetTexture = null;
RenderTexture bgrTexture = null;
-#if UNITY_EDITOR
- // If enabled, instantiate dismissable warning message.
- InstantPreviewWarning prefab =
- AssetDatabase.LoadAssetAtPath(
- InstantPreviewWarningPrefabPath);
- if (prefab != null && prefab.ShowEditorWarning)
- {
- GameObject warningCanvas = GameObject.Instantiate(prefab.gameObject) as GameObject;
- GameObject.DontDestroyOnLoad(warningCanvas);
- }
-#endif // UNITY_EDITOR
-
// Begins update loop. The coroutine will cease when the
// ARCoreSession component it's called from is destroyed.
for (;;)
@@ -320,6 +324,13 @@ private static IEnumerator UpdateLoop(string adbPath)
NativeApi.Update();
InstantPreviewInput.Update();
+
+ if (NativeApi.AppShowedTouchWarning())
+ {
+ Debug.LogWarning(k_InstantPreviewInputWarning);
+ NativeApi.UnityLoggedTouchWarning();
+ }
+
AddInstantPreviewTrackedPoseDriverWhenNeeded();
Graphics.Blit(null, screenTexture);
@@ -369,31 +380,6 @@ private static void AddInstantPreviewTrackedPoseDriverWhenNeeded()
}
}
- private static string GetAdbPath()
- {
- string sdkRoot = null;
-#if UNITY_EDITOR
- // Gets adb path and starts instant preview server.
- sdkRoot = UnityEditor.EditorPrefs.GetString("AndroidSdkRoot");
-#endif // UNITY_EDITOR
-
- if (string.IsNullOrEmpty(sdkRoot))
- {
- return null;
- }
-
- // Gets adb path from known directory.
- var adbPath = Path.Combine(Path.GetFullPath(sdkRoot),
- "platform-tools" + Path.DirectorySeparatorChar + "adb");
-
- if (Application.platform == RuntimePlatform.WindowsEditor)
- {
- adbPath = Path.ChangeExtension(adbPath, "exe");
- }
-
- return adbPath;
- }
-
///
/// Tries to install and run the Instant Preview android app.
///
@@ -633,6 +619,15 @@ public static extern bool LockCameraTexture(out IntPtr pixelBytes, out int width
[AndroidImport(InstantPreviewNativeApi)]
public static extern bool IsConnected();
+
+ [AndroidImport(InstantPreviewNativeApi)]
+ public static extern bool AppShowedTouchWarning();
+
+ [AndroidImport(InstantPreviewNativeApi)]
+ public static extern bool UnityLoggedTouchWarning();
+
+ [AndroidImport(InstantPreviewNativeApi)]
+ public static extern void SendToast(string toastMessage);
#pragma warning restore 626
}
diff --git a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewWarning.cs b/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewWarning.cs
deleted file mode 100644
index 1d5d8f34..00000000
--- a/Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewWarning.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//-----------------------------------------------------------------------
-//
-//
-// Copyright 2018 Google Inc. All Rights Reserved.
-//
-// 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.
-//
-//
-//-----------------------------------------------------------------------
-
-namespace GoogleARCoreInternal
-{
- using UnityEngine;
-
-#if UNITY_EDITOR
- // Set up touch input propagation while using Instant Preview in the editor.
- using Input = GoogleARCore.InstantPreviewInput;
-#endif
-
- ///
- /// Logs and dismisses on-screen Instant Preview warning.
- ///
- public class InstantPreviewWarning : MonoBehaviour
- {
- ///
- /// Allows developers to disable warning message.
- ///
- [Tooltip(
- "Whether to show warning in play mode regarding Instant Preview's limited support " +
- "for touch based input.")]
- public bool ShowEditorWarning = true;
-
- private string m_InstantPreviewDocumentationUrl =
- "https://developers.google.com/ar/develop/unity/instant-preview";
-
- private void Awake()
- {
- Destroy(gameObject, 4);
- }
-
- private void Start()
- {
- string prefabPath =
- InstantPreviewManager.InstantPreviewWarningPrefabPath.Replace(".prefab",
- string.Empty);
- Debug.LogWarningFormat(
- "Instant Preview has limited support for touch based input, see {0} for " +
- "details.\n" +
- "To disable this warning, uncheck 'Show Editor Warning' in the '{1}' prefab.",
- m_InstantPreviewDocumentationUrl, prefabPath);
- }
-
- private void Update()
- {
- if (Input.touchCount > 0 || Input.GetMouseButtonDown(0))
- {
- Destroy(gameObject);
- }
- }
- }
-}
diff --git a/Assets/GoogleARCore/SDK/Materials/ARBackground.shader b/Assets/GoogleARCore/SDK/Materials/ARBackground.shader
index 8e81eb6e..1011be96 100644
--- a/Assets/GoogleARCore/SDK/Materials/ARBackground.shader
+++ b/Assets/GoogleARCore/SDK/Materials/ARBackground.shader
@@ -27,6 +27,12 @@
uniform vec4 _UvTopLeftRight;
uniform vec4 _UvBottomLeftRight;
+ // Use the same method in UnityCG.cginc to convert from gamma to linear space in glsl.
+ vec3 GammaToLinearSpace(vec3 color)
+ {
+ return color * (color * (color * 0.305306011 + 0.682171111) + 0.012522878);
+ }
+
#ifdef VERTEX
varying vec2 textureCoord;
@@ -55,13 +61,13 @@
void main()
{
vec3 mainTexColor;
-
+
#ifdef SHADER_API_GLES3
mainTexColor = texture(_MainTex, textureCoord).rgb;
#else
mainTexColor = textureExternal(_MainTex, textureCoord).rgb;
#endif
-
+
if (_Brightness < 1.0)
{
mainTexColor = mainTexColor * _Brightness;
@@ -74,9 +80,9 @@
vec4 transitionColor = vec4(0.0);
if (uvCoordTex.x >= 0.0 && uvCoordTex.x <= 1.0 && uvCoordTex.y >= 0.0 && uvCoordTex.y <= 1.0)
{
- transitionColor = texture(_TransitionIconTex, uvCoordTex);
+ transitionColor = texture2D(_TransitionIconTex, uvCoordTex);
}
-
+
if (transitionColor.a > 0.0)
{
mainTexColor = mix(transitionColor.rgb, mainTexColor, _Brightness);
@@ -84,6 +90,10 @@
}
}
+#ifndef UNITY_COLORSPACE_GAMMA
+
+ mainTexColor = GammaToLinearSpace(mainTexColor);
+#endif
gl_FragColor = vec4(mainTexColor, 1.0);
}
diff --git a/Assets/GoogleARCore/SDK/Plugins/arcore_client.aar b/Assets/GoogleARCore/SDK/Plugins/arcore_client.aar
index 6e6df326..3a346d4a 100644
Binary files a/Assets/GoogleARCore/SDK/Plugins/arcore_client.aar and b/Assets/GoogleARCore/SDK/Plugins/arcore_client.aar differ
diff --git a/Assets/GoogleARCore/SDK/Plugins/arcore_unity.aar b/Assets/GoogleARCore/SDK/Plugins/arcore_unity.aar
index ab5c33b0..9cd3ceac 100644
Binary files a/Assets/GoogleARCore/SDK/Plugins/arcore_unity.aar and b/Assets/GoogleARCore/SDK/Plugins/arcore_unity.aar differ
diff --git a/Assets/GoogleARCore/SDK/Plugins/google_ar_optional.aar b/Assets/GoogleARCore/SDK/Plugins/google_ar_optional.aar
index 1b81af55..a2ed3b56 100644
Binary files a/Assets/GoogleARCore/SDK/Plugins/google_ar_optional.aar and b/Assets/GoogleARCore/SDK/Plugins/google_ar_optional.aar differ
diff --git a/Assets/GoogleARCore/SDK/Plugins/google_ar_required.aar b/Assets/GoogleARCore/SDK/Plugins/google_ar_required.aar
index 0a1cf860..d2883934 100644
Binary files a/Assets/GoogleARCore/SDK/Plugins/google_ar_required.aar and b/Assets/GoogleARCore/SDK/Plugins/google_ar_required.aar differ
diff --git a/Assets/GoogleARCore/SDK/Plugins/unityandroidpermissions.aar b/Assets/GoogleARCore/SDK/Plugins/unityandroidpermissions.aar
index acb6aa5a..ad9d08d7 100644
Binary files a/Assets/GoogleARCore/SDK/Plugins/unityandroidpermissions.aar and b/Assets/GoogleARCore/SDK/Plugins/unityandroidpermissions.aar differ
diff --git a/Assets/GoogleARCore/SDK/Plugins/unitygar.aar b/Assets/GoogleARCore/SDK/Plugins/unitygar.aar
index e180693f..9256663a 100644
Binary files a/Assets/GoogleARCore/SDK/Plugins/unitygar.aar and b/Assets/GoogleARCore/SDK/Plugins/unitygar.aar differ
diff --git a/Assets/GoogleARCore/SDK/Scripts/ARCoreSessionConfig.cs b/Assets/GoogleARCore/SDK/Scripts/ARCoreSessionConfig.cs
index f88f638c..12272630 100644
--- a/Assets/GoogleARCore/SDK/Scripts/ARCoreSessionConfig.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/ARCoreSessionConfig.cs
@@ -27,7 +27,7 @@ namespace GoogleARCore
/// Holds settings that are used to configure the session.
///
[CreateAssetMenu(
- fileName = "ARCoreSessionConfig", menuName = "GoogleARCore/SessionConfig", order = 1)]
+ fileName = "ARCoreSessionConfig", menuName = "Google ARCore/SessionConfig", order = 1)]
[HelpURL(
"https://developers.google.com/ar/reference/unity/class/GoogleARCore/ARCoreSessionConfig")]
public class ARCoreSessionConfig : ScriptableObject
diff --git a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageApi.cs b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageApi.cs
index df8d9c19..9bb30663 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageApi.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageApi.cs
@@ -89,6 +89,14 @@ public string GetName(IntPtr augmentedImageHandle)
return name;
}
+ public AugmentedImageTrackingMethod GetTrackingMethod(IntPtr augmentedImageHandle)
+ {
+ AugmentedImageTrackingMethod trackingMethod = AugmentedImageTrackingMethod.NotTracking;
+ ExternApi.ArAugmentedImage_getTrackingMethod(
+ m_NativeSession.SessionHandle, augmentedImageHandle, ref trackingMethod);
+ return trackingMethod;
+ }
+
private struct ExternApi
{
#pragma warning disable 626
@@ -112,6 +120,10 @@ public static extern void ArAugmentedImage_getExtentZ(IntPtr sessionHandle,
public static extern void ArAugmentedImage_acquireName(IntPtr sessionHandle,
IntPtr augmentedImageHandle, ref IntPtr outName);
+ [AndroidImport(ApiConstants.ARCoreNativeApi)]
+ public static extern void ArAugmentedImage_getTrackingMethod(IntPtr sessionHandle,
+ IntPtr augmentedImageHandle, ref AugmentedImageTrackingMethod trackingMethod);
+
[AndroidImport(ApiConstants.ARCoreNativeApi)]
public static extern void ArString_release(IntPtr str);
#pragma warning restore 626
diff --git a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageDatabaseApi.cs b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageDatabaseApi.cs
index ddb0d4ee..46c04e03 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageDatabaseApi.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/AugmentedImageDatabaseApi.cs
@@ -77,6 +77,14 @@ public Int32 AddImageAtRuntime(
IntPtr databaseHandle, string name, Texture2D image, float width)
{
Int32 outIndex = -1;
+
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("add images to Augmented Image " +
+ "database");
+ return outIndex;
+ }
+
GCHandle grayscaleBytesHandle = _ConvertTextureToGrayscaleBytes(image);
if (grayscaleBytesHandle.AddrOfPinnedObject() == IntPtr.Zero)
{
diff --git a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraApi.cs b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraApi.cs
index 3d132a11..c4a6c357 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraApi.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraApi.cs
@@ -51,6 +51,13 @@ public TrackingState GetTrackingState(IntPtr cameraHandle)
public LostTrackingReason GetLostTrackingReason(IntPtr cameraHandle)
{
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("determine tracking failure " +
+ "reasons");
+ return LostTrackingReason.None;
+ }
+
ApiTrackingFailureReason apiTrackingFailureReason = ApiTrackingFailureReason.None;
ExternApi.ArCamera_getTrackingFailureReason(m_NativeSession.SessionHandle,
cameraHandle, ref apiTrackingFailureReason);
@@ -83,6 +90,13 @@ public Matrix4x4 GetProjectionMatrix(IntPtr cameraHandle, float near, float far)
public CameraIntrinsics GetTextureIntrinsics(IntPtr cameraHandle)
{
IntPtr cameraIntrinsicsHandle = IntPtr.Zero;
+
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("access GPU texture intrinsics");
+ return new CameraIntrinsics();
+ }
+
ExternApi.ArCameraIntrinsics_create(
m_NativeSession.SessionHandle, ref cameraIntrinsicsHandle);
@@ -99,6 +113,13 @@ public CameraIntrinsics GetTextureIntrinsics(IntPtr cameraHandle)
public CameraIntrinsics GetImageIntrinsics(IntPtr cameraHandle)
{
IntPtr cameraIntrinsicsHandle = IntPtr.Zero;
+
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("access CPU image intrinsics");
+ return new CameraIntrinsics();
+ }
+
ExternApi.ArCameraIntrinsics_create(
m_NativeSession.SessionHandle, ref cameraIntrinsicsHandle);
diff --git a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraConfigApi.cs b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraConfigApi.cs
index 65ffb5fc..b82499fd 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraConfigApi.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraConfigApi.cs
@@ -45,6 +45,13 @@ public CameraConfigApi(NativeSession nativeSession)
public IntPtr Create()
{
IntPtr cameraConfigHandle = IntPtr.Zero;
+
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("create ARCamera config");
+ return cameraConfigHandle;
+ }
+
ExternApi.ArCameraConfig_create(m_NativeSession.SessionHandle, ref cameraConfigHandle);
return cameraConfigHandle;
}
@@ -59,6 +66,12 @@ public void GetImageDimensions(IntPtr cameraConfigHandle, out int width, out int
width = 0;
height = 0;
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("access ARCamera image dimensions");
+ return;
+ }
+
ExternApi.ArCameraConfig_getImageDimensions(
m_NativeSession.SessionHandle, cameraConfigHandle, ref width, ref height);
}
@@ -68,6 +81,13 @@ public void GetTextureDimensions(IntPtr cameraConfigHandle, out int width, out i
width = 0;
height = 0;
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage(
+ "access ARCamera texture dimensions");
+ return;
+ }
+
ExternApi.ArCameraConfig_getTextureDimensions(
m_NativeSession.SessionHandle, cameraConfigHandle, ref width, ref height);
}
@@ -75,6 +95,13 @@ public void GetTextureDimensions(IntPtr cameraConfigHandle, out int width, out i
public ApiCameraConfigFacingDirection GetFacingDirection(IntPtr cameraConfigHandle)
{
ApiCameraConfigFacingDirection direction = ApiCameraConfigFacingDirection.Back;
+
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("access ARCamera facing direction");
+ return direction;
+ }
+
ExternApi.ArCameraConfig_getFacingDirection(
m_NativeSession.SessionHandle, cameraConfigHandle, ref direction);
diff --git a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraMetadataApi.cs b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraMetadataApi.cs
index cb0d1469..60e97791 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraMetadataApi.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/CameraMetadataApi.cs
@@ -133,6 +133,13 @@ public bool GetAllCameraMetadataTags(
IntPtr cameraMetadataHandle, List resultList)
{
IntPtr ndkMetadataHandle = IntPtr.Zero;
+
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("access camera metadata tags");
+ return false;
+ }
+
ExternApi.ArImageMetadata_getNdkCameraMetadata(m_NativeSession.SessionHandle,
cameraMetadataHandle, ref ndkMetadataHandle);
diff --git a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/HitTestApi.cs b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/HitTestApi.cs
index e9bef38e..0528143e 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/HitTestApi.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/HitTestApi.cs
@@ -168,8 +168,15 @@ private bool HitResultListGetItemAt(
}
else
{
- m_NativeSession.PoseApi.Destroy(poseHandle);
- return false;
+ ApiTrackableType trackableType =
+ m_NativeSession.TrackableApi.GetType(trackableHandle);
+ if (!ExperimentManager.Instance.IsManagingTrackableType((int)trackableType))
+ {
+ m_NativeSession.PoseApi.Destroy(poseHandle);
+ return false;
+ }
+
+ flag |= ExperimentManager.Instance.GetTrackableHitFlags((int)trackableType);
}
outTrackableHit = new TrackableHit(hitPose, hitDistance, flag, trackable);
diff --git a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/SessionApi.cs b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/SessionApi.cs
index 7b707bd6..3689e0cb 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/SessionApi.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Api/Wrappers/SessionApi.cs
@@ -102,6 +102,13 @@ public ApiArStatus SetCameraConfig(IntPtr cameraConfigHandle)
public CameraConfig GetCameraConfig()
{
IntPtr cameraConfigHandle = m_NativeSession.CameraConfigApi.Create();
+
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("access camera config");
+ return new CameraConfig();
+ }
+
ExternApi.ArSession_getCameraConfig(m_NativeSession.SessionHandle, cameraConfigHandle);
CameraConfig currentCameraConfig = _CreateCameraConfig(cameraConfigHandle);
m_NativeSession.CameraConfigApi.Destroy(cameraConfigHandle);
diff --git a/Assets/GoogleARCore/SDK/Scripts/AugmentedImage.cs b/Assets/GoogleARCore/SDK/Scripts/AugmentedImage.cs
index 99ddbe95..af0161d2 100644
--- a/Assets/GoogleARCore/SDK/Scripts/AugmentedImage.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/AugmentedImage.cs
@@ -123,5 +123,17 @@ public float ExtentZ
return m_NativeSession.AugmentedImageApi.GetExtentZ(m_TrackableNativeHandle);
}
}
+
+ ///
+ /// Gets the current method being used to track this Augmented Image.
+ ///
+ /// The current tracking method being used.
+ public AugmentedImageTrackingMethod TrackingMethod
+ {
+ get
+ {
+ return m_NativeSession.AugmentedImageApi.GetTrackingMethod(m_TrackableNativeHandle);
+ }
+ }
}
}
diff --git a/Assets/GoogleARCore/SDK/Scripts/AugmentedImageTrackingMethod.cs b/Assets/GoogleARCore/SDK/Scripts/AugmentedImageTrackingMethod.cs
new file mode 100644
index 00000000..7f85baef
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/AugmentedImageTrackingMethod.cs
@@ -0,0 +1,50 @@
+//-----------------------------------------------------------------------
+//
+//
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// 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.
+//
+//
+//-----------------------------------------------------------------------
+namespace GoogleARCore
+{
+ ///
+ /// Indicates whether an image is being tracked using the camera image,
+ /// or is being tracked based on its last known pose.
+ ///
+ public enum AugmentedImageTrackingMethod
+ {
+ ///
+ /// The Augmented Image is not currently being tracked.
+ /// This state indicates that the image's is
+ /// or .
+ ///
+ NotTracking = 0,
+
+ ///
+ /// The Augmented Image is currently being tracked using the camera image.
+ /// This state can only occur when the image's is
+ /// .
+ ///
+ FullTracking = 1,
+
+ ///
+ /// The Augmented Image is currently being tracked based on its last known pose,
+ /// because it can no longer be tracked using the camera image.
+ /// This state can only occur when the image's is
+ /// .
+ ///
+ LastKnownPose = 2,
+ }
+}
diff --git a/Assets/GoogleARCore/SDK/Scripts/AugmentedImageTrackingMethod.cs.meta b/Assets/GoogleARCore/SDK/Scripts/AugmentedImageTrackingMethod.cs.meta
new file mode 100644
index 00000000..1f7f0abd
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/AugmentedImageTrackingMethod.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3115932e5f4e346b88357d5293a2a5cc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalytics.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalytics.cs
index 1197c123..038b3a70 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalytics.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalytics.cs
@@ -54,35 +54,16 @@ static ARCoreAnalytics()
Instance = new ARCoreAnalytics();
Instance.Load();
+ // Send analytics immediately.
+ Instance.SendAnalytics(k_GoogleAnalyticsHost, LogRequestUtils.BuildLogRequest(), false);
+
// Use the Editor Update callback to monitor the communication to the server.
EditorApplication.update +=
new EditorApplication.CallbackFunction(Instance._OnAnalyticsUpdate);
-
- // Send analytics now.
- Instance.SendAnalytics(k_GoogleAnalyticsHost, LogRequestUtils.BuildLogRequest(), false);
}
public static ARCoreAnalytics Instance { get; private set; }
- ///
- /// Adds a preference setting to the editor to enable or disable Analytics.
- /// TODO: Using the preferences implementation to support 2017.x, this should
- /// be changed to a SettingsProvider for 2018.x+ at end of life for 2017.
- ///
- [PreferenceItem("Google ARCore")]
- public static void PreferencesGUI()
- {
- // Add GUI for the Enabled setting.
- Instance.EnableAnalytics = EditorGUILayout.Toggle(
- "Enable Google ARCore SDK Analytics.", Instance.EnableAnalytics);
-
- // Save the updated setting.
- if (GUI.changed)
- {
- Instance.Save();
- }
- }
-
///
/// Loads analytics settings.
///
@@ -108,6 +89,9 @@ public void Save()
public void SendAnalytics(string analyticsHost, LogRequest logRequest, bool verbose)
{
#if UNITY_2017_1_OR_NEWER
+ // Save the time sending was last attempted.
+ m_LastUpdateTicks = DateTime.Now.Ticks;
+
// Only send if analytics is enabled.
if (EnableAnalytics == false)
{
@@ -148,9 +132,6 @@ public void SendAnalytics(string analyticsHost, LogRequest logRequest, bool verb
// The editor callback will follow through with this request.
m_WebRequest = webRequest;
#endif
-
- // Store the time of the last send attempt.
- m_LastUpdateTicks = DateTime.Now.Ticks;
}
///
@@ -159,6 +140,7 @@ public void SendAnalytics(string analyticsHost, LogRequest logRequest, bool verb
///
private void _OnAnalyticsUpdate()
{
+#if UNITY_2017_1_OR_NEWER
// Nothing to do if Analytics isn't enabled.
if (EnableAnalytics == false)
{
@@ -166,7 +148,6 @@ private void _OnAnalyticsUpdate()
}
// Process the current web request.
-#if UNITY_2017_1_OR_NEWER
if (m_WebRequest != null)
{
if (m_WebRequest.isDone == true)
@@ -186,7 +167,6 @@ private void _OnAnalyticsUpdate()
m_WebRequest = null;
}
}
-#endif
// Resend analytics periodically (once per week if the editor remains open.)
if (DateTime.Now.Ticks - m_LastUpdateTicks >= k_AnalyticsResendDelayTicks)
@@ -194,6 +174,7 @@ private void _OnAnalyticsUpdate()
Instance.SendAnalytics(
k_GoogleAnalyticsHost, LogRequestUtils.BuildLogRequest(), false);
}
+#endif
}
}
}
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsGUI.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsGUI.cs
new file mode 100644
index 00000000..25bd7c3e
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsGUI.cs
@@ -0,0 +1,49 @@
+//-----------------------------------------------------------------------
+//
+//
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// 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.
+//
+//
+//-----------------------------------------------------------------------
+
+namespace GoogleARCoreInternal
+{
+ using UnityEditor;
+ using UnityEngine;
+
+ internal class ARCoreAnalyticsGUI
+ {
+ // Use public static properties here, so that labels are automatically extracted by
+ // GetSearchKeywordsFromGUIContentProperties() in ARCoreAnalyticsProvider.
+ public static readonly GUIContent SDKAnalytics =
+ new GUIContent("Enable Google ARCore SDK Analytics");
+
+ private static float s_GroupLabelWidth = 260;
+
+ // Render ARCore Analytics Settings for ARCoreAnalyticsProvider and
+ // ARCoreAnalyticsPreferences.
+ internal static void OnGUI()
+ {
+ EditorGUIUtility.labelWidth = s_GroupLabelWidth;
+ ARCoreAnalytics.Instance.EnableAnalytics =
+ EditorGUILayout.Toggle(SDKAnalytics, ARCoreAnalytics.Instance.EnableAnalytics);
+
+ if (GUI.changed)
+ {
+ ARCoreAnalytics.Instance.Save();
+ }
+ }
+ }
+}
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsGUI.cs.meta b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsGUI.cs.meta
new file mode 100644
index 00000000..035439f1
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsGUI.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4b5deb8999e4147fdadbe331b45cfcd4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsPreferences.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsPreferences.cs
new file mode 100644
index 00000000..2707cc01
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsPreferences.cs
@@ -0,0 +1,39 @@
+//-----------------------------------------------------------------------
+//
+//
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// 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.
+//
+//
+//-----------------------------------------------------------------------
+
+// PreferencesItem has been deprecated and is included here to support
+// versions of Unity earlier that 2018.3. See also ARCoreAnalyticsProvider.
+#if !UNITY_2018_3_OR_NEWER
+
+namespace GoogleARCoreInternal
+{
+ using UnityEditor;
+
+ internal class ARCoreAnalyticsPreferences : EditorWindow
+ {
+ [PreferenceItem("Google ARCore")]
+ public static void PreferencesGUI()
+ {
+ ARCoreAnalyticsGUI.OnGUI();
+ }
+ }
+}
+
+#endif
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsPreferences.cs.meta b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsPreferences.cs.meta
new file mode 100644
index 00000000..cd27d39a
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsPreferences.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a68c53d329d684843b1079a68121e411
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsProvider.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsProvider.cs
new file mode 100644
index 00000000..71838a25
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsProvider.cs
@@ -0,0 +1,56 @@
+//-----------------------------------------------------------------------
+//
+//
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// 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.
+//
+//
+//-----------------------------------------------------------------------
+
+// Unity 2018.3 and later uses a SettingsProvider to add preference
+// options to the common dialog. See also ARCoreAnalyticsPreferences.
+#if UNITY_2018_3_OR_NEWER
+
+namespace GoogleARCoreInternal
+{
+ using UnityEditor;
+
+ internal class ARCoreAnalyticsProvider : SettingsProvider
+ {
+ public ARCoreAnalyticsProvider(string path, SettingsScope scope)
+ : base(path, scope)
+ {
+ }
+
+ [SettingsProvider]
+ public static SettingsProvider CreateARCoreAnalyticsProvider()
+ {
+ var provider =
+ new ARCoreAnalyticsProvider("Preferences/Google ARCore", SettingsScope.User);
+
+ // Automatically extract all keywords from public static GUI content.
+ provider.keywords =
+ GetSearchKeywordsFromGUIContentProperties();
+
+ return provider;
+ }
+
+ public override void OnGUI(string searchContext)
+ {
+ ARCoreAnalyticsGUI.OnGUI();
+ }
+ }
+}
+
+#endif
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsProvider.cs.meta b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsProvider.cs.meta
new file mode 100644
index 00000000..b6735411
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreAnalyticsProvider.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a23e02c5ec87f4b96ab06e170798cf61
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreProjectSettingsProvider.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreProjectSettingsProvider.cs
index 3adbec41..39b90a63 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreProjectSettingsProvider.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreProjectSettingsProvider.cs
@@ -27,23 +27,12 @@ namespace GoogleARCoreInternal
// later. In Unity versions prior to 2018.3, settings are instead made available by
// ARCoreProjectSettingsWindow.
#if UNITY_2018_3_OR_NEWER
-#if UNITY_2019_1_OR_NEWER
- using UnityEngine.UIElements;
-#else
- using UnityEngine.Experimental.UIElements;
-#endif
-
internal class ARCoreProjectSettingsProvider : SettingsProvider
{
public ARCoreProjectSettingsProvider(string path, SettingsScope scope): base(path, scope)
{
}
- public override void OnActivate(string searchContext, VisualElement rootElement)
- {
- ARCoreProjectSettings.Instance.Load();
- }
-
[SettingsProvider]
public static SettingsProvider CreateARCoreProjectSettingsProvider()
{
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreSupportedPreprocessBuild.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreSupportedPreprocessBuild.cs
index a3e8b94d..fe8c5662 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreSupportedPreprocessBuild.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/ARCoreSupportedPreprocessBuild.cs
@@ -38,6 +38,15 @@ public override void OnPreprocessBuild(BuildTarget target, string path)
{
CheckARCoreSupported();
}
+
+#if UNITY_2018_1_OR_NEWER
+ if (UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset != null)
+ {
+ Debug.LogWarning("Custom Rendering Pipeline Asset is not supported by ARCore. " +
+ "To ensure ACore work correctly, set Rendering Pipeline Asset to None in " +
+ "'Project Settings > Graphics > Scriptable Render Pipeline Settings'.");
+ }
+#endif // UNITY_2018_1_OR_NEWER
}
public void OnActiveBuildTargetChanged(BuildTarget previousTarget, BuildTarget newTarget)
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreClearcut.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreClearcut.cs
index 3801f7fe..c26ac93e 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreClearcut.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreClearcut.cs
@@ -2927,10 +2927,6 @@ public enum LogSource {
///
[pbr::OriginalName("APPS_TELEPATH_ANDROID_PRIMES")] AppsTelepathAndroidPrimes = 479,
///
- /// Logs for Paisa Experimental apps (go/paisa)
- ///
- [pbr::OriginalName("PIGEON_EXPERIMENTAL")] PigeonExperimental = 480,
- ///
/// (go/speakeasy)
///
[pbr::OriginalName("SPEAKEASY_BARKEEP_CLIENT")] SpeakeasyBarkeepClient = 481,
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreSdkLog.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreSdkLog.cs
index e1bd5214..23e9ae43 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreSdkLog.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/Analytics/ArcoreSdkLog.cs
@@ -24,20 +24,20 @@ public static partial class ArcoreSdkLogReflection {
static ArcoreSdkLogReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChRhcmNvcmVfc2RrX2xvZy5wcm90bxIRY29tLmdvb2dsZS5hcmNvcmUizAIK",
+ "ChRhcmNvcmVfc2RrX2xvZy5wcm90bxIRY29tLmdvb2dsZS5hcmNvcmUi5AIK",
"DEFyQ29yZVNka0xvZxIXCg9zZGtfaW5zdGFuY2VfaWQYASABKAkSGgoSYXJj",
"b3JlX3Nka192ZXJzaW9uGAIgASgJEhIKCm9zX3ZlcnNpb24YAyABKAkSOgoF",
"dW5pdHkYBCABKAsyKy5jb20uZ29vZ2xlLmFyY29yZS5BckNvcmVTZGtMb2cu",
- "VW5pdHlFbmdpbmUatgEKC1VuaXR5RW5naW5lEg8KB3ZlcnNpb24YASABKAkS",
- "TQoMZWRpdGlvbl90eXBlGAIgASgOMjcuY29tLmdvb2dsZS5hcmNvcmUuQXJD",
- "b3JlU2RrTG9nLlVuaXR5RW5naW5lLkVkaXRpb25UeXBlIkcKC0VkaXRpb25U",
- "eXBlEhgKFFVOS05PV05fRURJVElPTl9UWVBFEAASDAoIUEVSU09OQUwQARIQ",
- "CgxQUk9GRVNTSU9OQUwQAkIdqgIaR29vZ2xlQVJDb3JlSW50ZXJuYWwuUHJv",
- "dG9iBnByb3RvMw=="));
+ "VW5pdHlFbmdpbmUSFgoOc2RrX3Nlc3Npb25faWQYBSABKAkatgEKC1VuaXR5",
+ "RW5naW5lEg8KB3ZlcnNpb24YASABKAkSTQoMZWRpdGlvbl90eXBlGAIgASgO",
+ "MjcuY29tLmdvb2dsZS5hcmNvcmUuQXJDb3JlU2RrTG9nLlVuaXR5RW5naW5l",
+ "LkVkaXRpb25UeXBlIkcKC0VkaXRpb25UeXBlEhgKFFVOS05PV05fRURJVElP",
+ "Tl9UWVBFEAASDAoIUEVSU09OQUwQARIQCgxQUk9GRVNTSU9OQUwQAkIdqgIa",
+ "R29vZ2xlQVJDb3JlSW50ZXJuYWwuUHJvdG9iBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::GoogleARCoreInternal.Proto.ArCoreSdkLog), global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Parser, new[]{ "SdkInstanceId", "ArcoreSdkVersion", "OsVersion", "Unity" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Types.UnityEngine), global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Types.UnityEngine.Parser, new[]{ "Version", "EditionType" }, null, new[]{ typeof(global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Types.UnityEngine.Types.EditionType) }, null)})
+ new pbr::GeneratedClrTypeInfo(typeof(global::GoogleARCoreInternal.Proto.ArCoreSdkLog), global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Parser, new[]{ "SdkInstanceId", "ArcoreSdkVersion", "OsVersion", "Unity", "SdkSessionId" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Types.UnityEngine), global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Types.UnityEngine.Parser, new[]{ "Version", "EditionType" }, null, new[]{ typeof(global::GoogleARCoreInternal.Proto.ArCoreSdkLog.Types.UnityEngine.Types.EditionType) }, null)})
}));
}
#endregion
@@ -48,7 +48,7 @@ static ArcoreSdkLogReflection() {
/// Message with log extension for ARCore SDK within development engines, like
/// Unity and Unreal.
///
- /// Next ID: 5
+ /// Next ID: 6
///
public sealed partial class ArCoreSdkLog : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ArCoreSdkLog());
@@ -79,6 +79,7 @@ public ArCoreSdkLog(ArCoreSdkLog other) : this() {
arcoreSdkVersion_ = other.arcoreSdkVersion_;
osVersion_ = other.osVersion_;
unity_ = other.unity_ != null ? other.unity_.Clone() : null;
+ sdkSessionId_ = other.sdkSessionId_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -147,6 +148,23 @@ public string OsVersion {
}
}
+ /// Field number for the "sdk_session_id" field.
+ public const int SdkSessionIdFieldNumber = 5;
+ private string sdkSessionId_ = "";
+ ///
+ /// Session identifier to distinguish between events where a single project
+ /// is open for a long time, or multiple individual projects. A new id is
+ /// generated each time the user opens any project, it does not map to an
+ /// individual or project.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string SdkSessionId {
+ get { return sdkSessionId_; }
+ set {
+ sdkSessionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ArCoreSdkLog);
@@ -164,6 +182,7 @@ public bool Equals(ArCoreSdkLog other) {
if (ArcoreSdkVersion != other.ArcoreSdkVersion) return false;
if (OsVersion != other.OsVersion) return false;
if (!object.Equals(Unity, other.Unity)) return false;
+ if (SdkSessionId != other.SdkSessionId) return false;
return Equals(_unknownFields, other._unknownFields);
}
@@ -174,6 +193,7 @@ public override int GetHashCode() {
if (ArcoreSdkVersion.Length != 0) hash ^= ArcoreSdkVersion.GetHashCode();
if (OsVersion.Length != 0) hash ^= OsVersion.GetHashCode();
if (unity_ != null) hash ^= Unity.GetHashCode();
+ if (SdkSessionId.Length != 0) hash ^= SdkSessionId.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
@@ -203,6 +223,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(34);
output.WriteMessage(Unity);
}
+ if (SdkSessionId.Length != 0) {
+ output.WriteRawTag(42);
+ output.WriteString(SdkSessionId);
+ }
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
@@ -223,6 +247,9 @@ public int CalculateSize() {
if (unity_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Unity);
}
+ if (SdkSessionId.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(SdkSessionId);
+ }
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
@@ -249,6 +276,9 @@ public void MergeFrom(ArCoreSdkLog other) {
}
Unity.MergeFrom(other.Unity);
}
+ if (other.SdkSessionId.Length != 0) {
+ SdkSessionId = other.SdkSessionId;
+ }
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
@@ -279,6 +309,10 @@ public void MergeFrom(pb::CodedInputStream input) {
input.ReadMessage(unity_);
break;
}
+ case 42: {
+ SdkSessionId = input.ReadString();
+ break;
+ }
}
}
}
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/AndroidDependenciesHelper.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/AndroidDependenciesHelper.cs
new file mode 100644
index 00000000..d28aa10d
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/AndroidDependenciesHelper.cs
@@ -0,0 +1,165 @@
+//-----------------------------------------------------------------------
+//
+//
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// 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.
+//
+//
+//-----------------------------------------------------------------------
+
+namespace GoogleARCoreInternal
+{
+ using System;
+ using System.IO;
+ using System.Reflection;
+ using UnityEditor;
+ using UnityEngine;
+
+ ///
+ /// This handles the addition and removal android dependencies, and run PlayServicesResolver
+ /// plugin.
+ ///
+ internal static class AndroidDependenciesHelper
+ {
+ private static readonly string k_TemplateFileExtension = ".template";
+ private static readonly string k_PlayServiceDependencyFileExtension = ".xml";
+
+ ///
+ /// Handle the updating of the AndroidManifest tags by enabling/disabling the dependencies
+ /// manifest AAR as necessary.
+ ///
+ /// If set to true enabled dependencies.
+ /// Dependencies manifest GUID.
+ public static void SetAndroidPluginEnabled(bool enabledDependencies,
+ string dependenciesManifestGuid)
+ {
+ string manifestAssetPath = AssetDatabase.GUIDToAssetPath(dependenciesManifestGuid);
+ if (manifestAssetPath == null)
+ {
+ Debug.LogErrorFormat("ARCore: Could not locate dependencies manifest plugin.");
+ return;
+ }
+
+ PluginImporter pluginImporter =
+ AssetImporter.GetAtPath(manifestAssetPath) as PluginImporter;
+ if (pluginImporter == null)
+ {
+ Debug.LogErrorFormat("ARCore: Could not locate dependencies manifest plugin {0}.",
+ Path.GetFileName(manifestAssetPath));
+ return;
+ }
+
+ pluginImporter.SetCompatibleWithPlatform(BuildTarget.Android, enabledDependencies);
+ }
+
+ ///
+ /// Handle the addition or removal Android dependencies using the PlayServicesResolver.
+ /// Adding the dependencies is done by renaming the dependencies .template file to a .xml
+ /// file so that it will be picked up by the PlayServicesResolver plugin.
+ ///
+ /// If set to true enabled dependencies.
+ /// Dependencies template GUID.
+ public static void UpdateAndroidDependencies(bool enabledDependencies,
+ string dependenciesTemplateGuid)
+ {
+ string dependenciesTemplatePath =
+ AssetDatabase.GUIDToAssetPath(dependenciesTemplateGuid);
+ if (dependenciesTemplatePath == null)
+ {
+ Debug.LogError(
+ "Failed to enable ARCore Android dependencies xml. Template file is missing.");
+ return;
+ }
+
+ string dependenciesXMLPath = dependenciesTemplatePath.Replace(
+ k_TemplateFileExtension, k_PlayServiceDependencyFileExtension);
+
+ if (enabledDependencies && !File.Exists(dependenciesXMLPath))
+ {
+ Debug.LogFormat(
+ "Adding {0}.", Path.GetFileNameWithoutExtension(dependenciesTemplatePath));
+
+ File.Copy(dependenciesTemplatePath, dependenciesXMLPath);
+ AssetDatabase.Refresh();
+ }
+ else if (!enabledDependencies && File.Exists(dependenciesXMLPath))
+ {
+ Debug.LogFormat(
+ "Removing {0}.", Path.GetFileNameWithoutExtension(dependenciesTemplatePath));
+
+ File.Delete(dependenciesXMLPath);
+ File.Delete(dependenciesXMLPath + ".meta");
+ AssetDatabase.Refresh();
+ }
+ }
+
+ ///
+ /// Uses reflection to find the GooglePlayServices.PlayServicesResolver class and invoke
+ /// the public static method, MenuResolve() in order to resolve dependencies change.
+ ///
+ public static void DoPlayServicesResolve()
+ {
+ const string namespaceName = "GooglePlayServices";
+ const string className = "PlayServicesResolver";
+ const string methodName = "MenuResolve";
+ var assemblies = AppDomain.CurrentDomain.GetAssemblies();
+
+ foreach (var assembly in assemblies)
+ {
+ try
+ {
+ if (assembly.GetTypes() == null)
+ {
+ continue;
+ }
+ }
+ catch (ReflectionTypeLoadException)
+ {
+ // Could not get the Assembly types; skip it.
+ continue;
+ }
+
+ foreach (var type in assembly.GetTypes())
+ {
+ if (!type.IsClass || type.Namespace != namespaceName)
+ {
+ continue;
+ }
+
+ if (type.Name == className)
+ {
+ // We found the class we're looking for. Attempt to call the method and
+ // then return.
+ var menuResolveMethod = type.GetMethod(methodName,
+ BindingFlags.Public | BindingFlags.Static);
+ if (menuResolveMethod == null)
+ {
+ Debug.LogErrorFormat("ARCore: Error finding public static method " +
+ "{0} on {1}.{2}.", methodName, namespaceName, className);
+ return;
+ }
+
+ Debug.LogFormat("ARCore: Invoking {0}.{1}.{2}()",
+ namespaceName, className, methodName);
+ menuResolveMethod.Invoke(null, null);
+ return;
+ }
+ }
+ }
+
+ Debug.LogFormat("ARCore: Could not find class {0}.{1} for dependency resolution.",
+ namespaceName, className);
+ }
+ }
+}
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/AndroidDependenciesHelper.cs.meta b/Assets/GoogleARCore/SDK/Scripts/Editor/AndroidDependenciesHelper.cs.meta
new file mode 100644
index 00000000..ef2beea3
--- /dev/null
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/AndroidDependenciesHelper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5a071404a6c424f42aadaeaa6423ed32
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/AugmentedImageDatabaseContextMenu.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/AugmentedImageDatabaseContextMenu.cs
index d408822f..f4e2bbd3 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Editor/AugmentedImageDatabaseContextMenu.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/AugmentedImageDatabaseContextMenu.cs
@@ -44,7 +44,7 @@ public static class AugmentedImageDatabaseContextMenu
".psd", ".tiff", ".tga", ".gif", ".bmp", ".iff", ".pict"
};
- [MenuItem("Assets/Create/GoogleARCore/AugmentedImageDatabase", false, 2)]
+ [MenuItem("Assets/Create/Google ARCore/AugmentedImageDatabase", false, 2)]
private static void AddAssetsToNewAugmentedImageDatabase()
{
var selectedImagePaths = new List();
@@ -60,6 +60,13 @@ private static void AddAssetsToNewAugmentedImageDatabase()
Debug.LogWarningFormat(message);
EditorUtility.DisplayDialog("Unsupported Images Selected", message, "Ok");
}
+ else if (selectedImagePaths.Count == 0)
+ {
+ var message = "Please select one or more images before using 'Create > " +
+ "Google ARCore > AugmentedImageDatabase'.";
+ Debug.LogWarningFormat(message);
+ EditorUtility.DisplayDialog("No Image Selected", message, "Ok");
+ }
if (selectedImagePaths.Count > 0)
{
@@ -100,13 +107,6 @@ private static void AddAssetsToNewAugmentedImageDatabase()
}
}
- [MenuItem("Assets/Create/GoogleARCore/AugmentedImageDatabase", true, 2)]
- private static bool AddAssetsToNewAugmentedImageDatabaseValidation()
- {
- bool unsupportedSelected;
- return _GetSelectedImagePaths(out unsupportedSelected).Count > 0;
- }
-
private static List _GetSelectedImagePaths(out bool unsupportedImagesSelected)
{
var selectedImagePaths = new List();
diff --git a/Assets/GoogleARCore/SDK/Scripts/Editor/LogRequestUtils.cs b/Assets/GoogleARCore/SDK/Scripts/Editor/LogRequestUtils.cs
index cd699665..656d12a2 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Editor/LogRequestUtils.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Editor/LogRequestUtils.cs
@@ -34,6 +34,7 @@ namespace GoogleARCoreInternal
public class LogRequestUtils
{
private const string k_GoogleAnalyticsId = "GoogleAnalyticsId";
+ private static string s_SessionId = string.Empty;
///
/// Generates a new LogRequest using the current system configuration.
@@ -62,6 +63,7 @@ ArCoreSdkLog.Types.UnityEngine.Types.EditionType editionType
OsVersion = SystemInfo.operatingSystem,
ArcoreSdkVersion = GoogleARCore.VersionInfo.Version,
Unity = engine, // Unity engine version.
+ SdkSessionId = _SessionId(),
};
// Assemble the Clearcut log event data.
@@ -119,6 +121,22 @@ private static string _UniqueId()
return id;
}
+ ///
+ /// The current session id. This is generated on first request and
+ /// used while the current project remains open.
+ ///
+ /// The current session id.
+ private static string _SessionId()
+ {
+ // Generate on first request.
+ if (s_SessionId == string.Empty)
+ {
+ s_SessionId = Guid.NewGuid().ToString();
+ }
+
+ return s_SessionId;
+ }
+
///
/// Current UTC coordinated time.
///
diff --git a/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentBase.cs b/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentBase.cs
index 92ac5b41..c3190c53 100644
--- a/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentBase.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentBase.cs
@@ -38,6 +38,14 @@ public virtual int GetExperimentalFeatureFlags()
return 0;
}
+ ///
+ /// Called before lifecycle manager call ArPresto_update to update session features
+ /// that requre session recreation.
+ ///
+ public virtual void OnUpdateSessionFeatures()
+ {
+ }
+
///
/// Called at the beginnging of the frame.
///
@@ -75,6 +83,17 @@ public virtual bool IsManagingTrackableType(int trackableType)
return false;
}
+ ///
+ /// Called to retrieve TrackableHitFlags associated with the trackable managed by the
+ /// experiment.
+ ///
+ /// The trackable type.
+ /// TrackableHitFlags value for the associated trackable.
+ public virtual TrackableHitFlags GetTrackableHitFlags(int trackableType)
+ {
+ return TrackableHitFlags.None;
+ }
+
///
/// Factory for creating or accessing a trackable managed by the experiment.
///
diff --git a/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentManager.cs b/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentManager.cs
index 1659660b..b155eb7d 100644
--- a/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentManager.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/ExperimentSupport/ExperimentManager.cs
@@ -77,7 +77,6 @@ public static ExperimentManager Instance
if (s_Instance == null)
{
s_Instance = new ExperimentManager();
- LifecycleManager.Instance.EarlyUpdate += s_Instance._OnEarlyUpdate;
}
return s_Instance;
@@ -101,6 +100,13 @@ public bool IsConfigurationDirty
}
}
+ public void Initialize()
+ {
+ LifecycleManager.Instance.EarlyUpdate += s_Instance._OnEarlyUpdate;
+ LifecycleManager.Instance.UpdateSessionFeatures +=
+ s_Instance.OnUpdateSessionFeatures;
+ }
+
public void OnBeforeSetConfiguration(IntPtr sessionHandle, IntPtr configHandle)
{
foreach (var experiment in m_Experiments)
@@ -114,6 +120,17 @@ public bool IsManagingTrackableType(int trackableType)
return _GetTrackableTypeManager(trackableType) != null;
}
+ public TrackableHitFlags GetTrackableHitFlags(int trackableType)
+ {
+ ExperimentBase trackableManager = _GetTrackableTypeManager(trackableType);
+ if (trackableManager != null)
+ {
+ return trackableManager.GetTrackableHitFlags(trackableType);
+ }
+
+ return TrackableHitFlags.None;
+ }
+
public Trackable TrackableFactory(int trackableType, IntPtr trackableHandle)
{
ExperimentBase trackableManager = _GetTrackableTypeManager(trackableType);
@@ -122,8 +139,15 @@ public Trackable TrackableFactory(int trackableType, IntPtr trackableHandle)
return trackableManager.TrackableFactory(trackableType, trackableHandle);
}
- throw new NotImplementedException(
- "ExperimentManager.TrackableFactory::No constructor for requested trackable type.");
+ return null;
+ }
+
+ public void OnUpdateSessionFeatures()
+ {
+ foreach (var experiment in m_Experiments)
+ {
+ experiment.OnUpdateSessionFeatures();
+ }
}
private void _OnEarlyUpdate()
diff --git a/Assets/GoogleARCore/SDK/Scripts/Frame.cs b/Assets/GoogleARCore/SDK/Scripts/Frame.cs
index e09b16aa..f00d4512 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Frame.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Frame.cs
@@ -538,13 +538,6 @@ public static CameraIntrinsics ImageIntrinsics
{
get
{
- if (InstantPreviewManager.IsProvidingPlatform)
- {
- InstantPreviewManager.LogLimitedSupportMessage(
- "access CPU Image intrinsics");
- return new CameraIntrinsics();
- }
-
var nativeSession = LifecycleManager.Instance.NativeSession;
if (nativeSession == null)
{
@@ -597,11 +590,12 @@ public static Vector2 TransformCoordinate(
}
///
- /// Attempts to acquire the camera image for CPU access.
+ /// Attempts to acquire the camera image for CPU access that corresponds to the current
+ /// frame.
///
///
- /// Not supported on all devices
- /// (see https://developers.google.com/ar/discover/supported-devices).
+ /// Depending on device performance, this can fail for several frames after session
+ /// start, and for a few frames at a time while the session is running.
///
/// A CameraImageBytes struct with IsAvailable property set to
/// true if successful and false if the image could not be
diff --git a/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreAndroidLifecycleManager.cs b/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreAndroidLifecycleManager.cs
index f1fc69dc..f12d54e5 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreAndroidLifecycleManager.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreAndroidLifecycleManager.cs
@@ -65,6 +65,8 @@ internal class ARCoreAndroidLifecycleManager : ILifecycleManager
private List m_TempCameraConfigs = new List();
+ public event Action UpdateSessionFeatures;
+
public event Action EarlyUpdate;
public event Action OnSessionSetEnabled;
@@ -80,6 +82,8 @@ public static ARCoreAndroidLifecycleManager Instance
ARPrestoCallbackManager.Instance.EarlyUpdate += s_Instance._OnEarlyUpdate;
ARPrestoCallbackManager.Instance.BeforeResumeSession +=
s_Instance._OnBeforeResumeSession;
+
+ ExperimentManager.Instance.Initialize();
}
return s_Instance;
@@ -227,13 +231,34 @@ private void _OnEarlyUpdate()
}
// Perform updates before calling ArPresto_update.
- _UpdateDisplayGeometry();
if (SessionComponent != null)
{
+ IntPtr previousSession = IntPtr.Zero;
+ ExternApi.ArPresto_getSession(ref previousSession);
+
+ if (UpdateSessionFeatures != null)
+ {
+ UpdateSessionFeatures();
+ }
+
_SetCameraDirection(SessionComponent.DeviceCameraDirection);
+
+ IntPtr currentSession = IntPtr.Zero;
+ ExternApi.ArPresto_getSession(ref currentSession);
+
+ // Fire the session enabled event when the underlying session has been changed
+ // due to session feature update(camera direction etc).
+ if (previousSession != currentSession)
+ {
+ _FireOnSessionSetEnabled(false);
+ _FireOnSessionSetEnabled(true);
+ }
+
_SetConfiguration(SessionComponent.SessionConfig);
}
+ _UpdateDisplayGeometry();
+
// Update ArPresto and potentially ArCore.
ExternApi.ArPresto_update();
@@ -348,19 +373,19 @@ private void _SetSessionEnabled(bool sessionEnabled)
ExternApi.ArPresto_setEnabled(sessionEnabled);
}
- private void _SetCameraDirection(DeviceCameraDirection cameraDirection)
+ private bool _SetCameraDirection(DeviceCameraDirection cameraDirection)
{
// The camera direction has not changed.
if (m_CachedCameraDirection.HasValue &&
m_CachedCameraDirection.Value == cameraDirection)
{
- return;
+ return false;
}
if (InstantPreviewManager.IsProvidingPlatform &&
cameraDirection == DeviceCameraDirection.BackFacing)
{
- return;
+ return false;
}
else if (InstantPreviewManager.IsProvidingPlatform)
{
@@ -372,7 +397,7 @@ private void _SetCameraDirection(DeviceCameraDirection cameraDirection)
SessionComponent.DeviceCameraDirection = DeviceCameraDirection.BackFacing;
}
- return;
+ return false;
}
m_CachedCameraDirection = cameraDirection;
@@ -381,9 +406,9 @@ private void _SetCameraDirection(DeviceCameraDirection cameraDirection)
ApiPrestoDeviceCameraDirection.BackFacing :
ApiPrestoDeviceCameraDirection.FrontFacing;
- _FireOnSessionSetEnabled(false);
ExternApi.ArPresto_setDeviceCameraDirection(apiCameraDirection);
- _FireOnSessionSetEnabled(true);
+
+ return true;
}
private void _SetConfiguration(ARCoreSessionConfig config)
diff --git a/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreIOSLifecycleManager.cs b/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreIOSLifecycleManager.cs
index a1fb70c5..f94271ed 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreIOSLifecycleManager.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreIOSLifecycleManager.cs
@@ -45,6 +45,8 @@ internal class ARCoreIOSLifecycleManager : ILifecycleManager
private IntPtr m_RealArKitSessionHandle = IntPtr.Zero;
+ public event Action UpdateSessionFeatures;
+
public event Action EarlyUpdate;
public event Action OnSessionSetEnabled;
diff --git a/Assets/GoogleARCore/SDK/Scripts/Managers/ARPrestoCallbackManager.cs b/Assets/GoogleARCore/SDK/Scripts/Managers/ARPrestoCallbackManager.cs
index 443c7aaa..c00708de 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Managers/ARPrestoCallbackManager.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Managers/ARPrestoCallbackManager.cs
@@ -101,6 +101,13 @@ public AsyncTask CheckApkAvailability()
AsyncTask task =
new AsyncTask(out onComplete);
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("determine ARCore APK " +
+ "availability");
+ return task;
+ }
+
ExternApi.ArPresto_checkApkAvailability(m_CheckApkAvailabilityResultCallback,
IntPtr.Zero);
@@ -115,6 +122,13 @@ public AsyncTask RequestApkInstallation(bool userRequeste
AsyncTask task =
new AsyncTask(out onComplete);
+ if (InstantPreviewManager.IsProvidingPlatform)
+ {
+ InstantPreviewManager.LogLimitedSupportMessage("request installation of ARCore " +
+ "APK");
+ return task;
+ }
+
ExternApi.ArPresto_requestApkInstallation(userRequested,
m_RequestApkInstallationResultCallback, IntPtr.Zero);
diff --git a/Assets/GoogleARCore/SDK/Scripts/Managers/CloudServiceManager.cs b/Assets/GoogleARCore/SDK/Scripts/Managers/CloudServiceManager.cs
index f5683d28..b2a49854 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Managers/CloudServiceManager.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Managers/CloudServiceManager.cs
@@ -109,7 +109,7 @@ public GoogleARCore.AsyncTask ResolveCloudAnchor(String cloud
return task;
}
- _CreateAndTrackCloudAnchorRequest(cloudAnchorHandle, onComplete);
+ _CreateAndTrackCloudAnchorRequest(cloudAnchorHandle, onComplete, cloudAnchorId);
return task;
}
@@ -150,7 +150,7 @@ protected internal bool _CreateCloudAnchorResultAsyncTask(
/// The on complete Action that was created for the
/// AsyncTask.
protected internal void _CreateAndTrackCloudAnchorRequest(IntPtr cloudAnchorHandle,
- Action onComplete)
+ Action onComplete, String cloudAnchorId = null)
{
if (LifecycleManager.Instance.NativeSession == null || cloudAnchorHandle == IntPtr.Zero)
{
@@ -169,6 +169,7 @@ protected internal void _CreateAndTrackCloudAnchorRequest(IntPtr cloudAnchorHand
{
IsComplete = false,
NativeSession = LifecycleManager.Instance.NativeSession,
+ CloudAnchorId = cloudAnchorId,
AnchorHandle = cloudAnchorHandle,
OnTaskComplete = onComplete,
};
@@ -204,6 +205,40 @@ protected internal void _CreateCloudAnchor(Action onComplete,
return;
}
+ protected internal void _CancelCloudAnchorRequest(String cloudAnchorId)
+ {
+ bool cancelledCloudAnchorRequest = false;
+ foreach (var request in m_CloudAnchorRequests)
+ {
+ if (request.CloudAnchorId == null || !request.CloudAnchorId.Equals(cloudAnchorId))
+ {
+ continue;
+ }
+
+ request.NativeSession.AnchorApi.Detach(request.AnchorHandle);
+ request.NativeSession.AnchorApi.Release(request.AnchorHandle);
+
+ var result = new CloudAnchorResult()
+ {
+ // TODO (b/128930901): Change to "ErrorRequestCancelled" for API promotion.
+ Response = CloudServiceResponse.ErrorCloudIdNotFound,
+ Anchor = null,
+ };
+
+ request.OnTaskComplete(result);
+ request.IsComplete = true;
+ cancelledCloudAnchorRequest = true;
+ }
+
+ m_CloudAnchorRequests.RemoveAll(x => x.IsComplete);
+
+ if (!cancelledCloudAnchorRequest)
+ {
+ Debug.LogWarning("Didn't find pending operation for cloudAnchorId: " +
+ cloudAnchorId);
+ }
+ }
+
private void _OnEarlyUpdate()
{
foreach (var request in m_CloudAnchorRequests)
@@ -226,7 +261,7 @@ private void _UpdateCloudAnchorRequest(
CloudServiceResponse response = CloudServiceResponse.Success;
try
{
- xpAnchor = XPAnchor.Factory(request.NativeSession, request.AnchorHandle);
+ xpAnchor = XPAnchor.Factory(request.NativeSession, request.AnchorHandle);
}
catch (Exception e)
{
@@ -279,6 +314,8 @@ private class CloudAnchorRequest
public NativeSession NativeSession;
+ public String CloudAnchorId;
+
public IntPtr AnchorHandle;
public Action OnTaskComplete;
diff --git a/Assets/GoogleARCore/SDK/Scripts/Managers/ILifecycleManager.cs b/Assets/GoogleARCore/SDK/Scripts/Managers/ILifecycleManager.cs
index e48f8906..80ffbc1e 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Managers/ILifecycleManager.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Managers/ILifecycleManager.cs
@@ -24,10 +24,12 @@ namespace GoogleARCoreInternal
using System.Diagnostics.CodeAnalysis;
using GoogleARCore;
- [SuppressMessage("UnityRules.UnityStyleRules", "US1101:NonPublicFieldsMustHavePrefixM",
- Justification = "This is an interface so fields are already public.")]
+ [SuppressMessage("UnityRules.UnityStyleRules", "US1101:NonPublicFieldsMustHavePrefixM",
+ Justification = "This is an interface so fields are already public.")]
internal interface ILifecycleManager
{
+ event Action UpdateSessionFeatures;
+
event Action EarlyUpdate;
event Action OnSessionSetEnabled;
diff --git a/Assets/GoogleARCore/SDK/Scripts/Managers/TrackableManager.cs b/Assets/GoogleARCore/SDK/Scripts/Managers/TrackableManager.cs
index 394c17fe..24547b43 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Managers/TrackableManager.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Managers/TrackableManager.cs
@@ -36,11 +36,11 @@ internal class TrackableManager
private List m_NewTrackables = new List();
- private List m_AllTrackables = new List();
+ private List m_AllTrackables = new List();
- private List m_UpdatedTrackables = new List();
+ private List m_UpdatedTrackables = new List();
- private HashSet m_OldTrackables = new HashSet();
+ private HashSet m_OldTrackables = new HashSet();
public TrackableManager(NativeSession nativeSession)
{
@@ -96,7 +96,7 @@ public Trackable TrackableFactory(IntPtr nativeHandle)
}
else
{
- throw new NotImplementedException(
+ Debug.LogWarning(
"TrackableFactory::No constructor for requested trackable type.");
}
#pragma warning restore 618
diff --git a/Assets/GoogleARCore/SDK/Scripts/Utility/ARCoreProjectSettings.cs b/Assets/GoogleARCore/SDK/Scripts/Utility/ARCoreProjectSettings.cs
index 8a23afce..b97c532e 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Utility/ARCoreProjectSettings.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Utility/ARCoreProjectSettings.cs
@@ -36,28 +36,34 @@ public class ARCoreProjectSettings
public bool IsIOSSupportEnabled;
public string CloudServicesApiKey;
public string IosCloudServicesApiKey;
- private const string k_VersionString = "V1.4.0";
private const string k_ProjectSettingsPath = "ProjectSettings/ARCoreProjectSettings.json";
+ private static ARCoreProjectSettings s_Instance = null;
- static ARCoreProjectSettings()
+ public static ARCoreProjectSettings Instance
{
- if (Application.isEditor)
+ get
{
- Instance = new ARCoreProjectSettings();
- Instance.Load();
- }
- else
- {
- Instance = null;
- Debug.LogError("Cannot access ARCoreProjectSettings outside of Unity Editor.");
+ if (s_Instance == null)
+ {
+ if (Application.isEditor)
+ {
+ s_Instance = new ARCoreProjectSettings();
+ s_Instance.Load();
+ }
+ else
+ {
+ Debug.LogError("Cannot access ARCoreProjectSettings outside of " +
+ "Unity Editor.");
+ }
+ }
+
+ return s_Instance;
}
}
- public static ARCoreProjectSettings Instance { get; private set; }
-
public void Load()
{
- Version = k_VersionString;
+ Version = GoogleARCore.VersionInfo.Version;
IsARCoreRequired = true;
IsInstantPreviewEnabled = true;
CloudServicesApiKey = string.Empty;
@@ -75,18 +81,24 @@ public void Load()
IsIOSSupportEnabled = settings.IsIOSSupportEnabled;
}
- // Upgrades settings from v1.0.0 to v1.1.0
+ // Upgrades settings from V1.0.0 to V1.1.0.
if (Version.Equals("V1.0.0"))
{
IsInstantPreviewEnabled = true;
- Version = k_VersionString;
+ Version = "V1.1.0";
}
- // Upgrades setting from v1.1.0 and v1.2.0 to v1.3.0.
- // Note: v1.2.0 went out with k_VersionString = v1.1.0
+ // Upgrades setting from V1.1.0 and V1.2.0 to V1.3.0.
+ // Note: V1.2.0 went out with k_VersionString = V1.1.0
if (Version.Equals("V1.1.0"))
{
IosCloudServicesApiKey = CloudServicesApiKey;
+ Version = "V1.3.0";
+ }
+
+ if (!Version.Equals(GoogleARCore.VersionInfo.Version))
+ {
+ Version = GoogleARCore.VersionInfo.Version;
}
}
diff --git a/Assets/GoogleARCore/SDK/Scripts/Utility/ConversionHelper.cs b/Assets/GoogleARCore/SDK/Scripts/Utility/ConversionHelper.cs
index b9971cfa..ca3bff20 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Utility/ConversionHelper.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Utility/ConversionHelper.cs
@@ -24,13 +24,18 @@ namespace GoogleARCoreInternal
internal class ConversionHelper
{
+ private static readonly Matrix4x4 k_UnityWorldToGLWorld
+ = Matrix4x4.Scale(new Vector3(1, 1, -1));
+
+ private static readonly Matrix4x4 k_UnityWorldToGLWorldInverse
+ = k_UnityWorldToGLWorld.inverse;
+
public static void UnityPoseToApiPose(Pose unityPose, out ApiPoseData apiPose)
{
Matrix4x4 glWorld_T_glLocal =
Matrix4x4.TRS(unityPose.position, unityPose.rotation, Vector3.one);
- Matrix4x4 unityWorld_T_glWorld = Matrix4x4.Scale(new Vector3(1, 1, -1));
Matrix4x4 unityWorld_T_unityLocal =
- unityWorld_T_glWorld * glWorld_T_glLocal * unityWorld_T_glWorld.inverse;
+ k_UnityWorldToGLWorld * glWorld_T_glLocal * k_UnityWorldToGLWorldInverse;
Vector3 position = unityWorld_T_unityLocal.GetColumn(3);
Quaternion rotation = Quaternion.LookRotation(unityWorld_T_unityLocal.GetColumn(2),
@@ -51,9 +56,8 @@ public static void ApiPoseToUnityPose(ApiPoseData apiPose, out Pose unityPose)
Matrix4x4.TRS(
new Vector3(apiPose.X, apiPose.Y, apiPose.Z),
new Quaternion(apiPose.Qx, apiPose.Qy, apiPose.Qz, apiPose.Qw), Vector3.one);
- Matrix4x4 unityWorld_T_glWorld = Matrix4x4.Scale(new Vector3(1, 1, -1));
Matrix4x4 unityWorld_T_unityLocal =
- unityWorld_T_glWorld * glWorld_T_glLocal * unityWorld_T_glWorld.inverse;
+ k_UnityWorldToGLWorld * glWorld_T_glLocal * k_UnityWorldToGLWorldInverse;
Vector3 position = unityWorld_T_unityLocal.GetColumn(3);
Quaternion rotation = Quaternion.LookRotation(unityWorld_T_unityLocal.GetColumn(2),
@@ -61,5 +65,11 @@ public static void ApiPoseToUnityPose(ApiPoseData apiPose, out Pose unityPose)
unityPose = new Pose(position, rotation);
}
+
+ public static void ApiVectorToUnityVector(float[] ApiVector, out Vector3 unityVector)
+ {
+ unityVector = k_UnityWorldToGLWorld * new Vector3(
+ ApiVector[0], ApiVector[1], ApiVector[2]);
+ }
}
}
diff --git a/Assets/GoogleARCore/SDK/Scripts/Utility/ShellHelper.cs b/Assets/GoogleARCore/SDK/Scripts/Utility/ShellHelper.cs
index 9d185103..7312c8a6 100644
--- a/Assets/GoogleARCore/SDK/Scripts/Utility/ShellHelper.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/Utility/ShellHelper.cs
@@ -20,7 +20,13 @@
namespace GoogleARCoreInternal
{
+ using System.IO;
using System.Text;
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+#endif
///
/// Misc helper methods for running shell commands.
@@ -62,5 +68,49 @@ public static void RunCommand(
error = errorBuilder.ToString().Trim();
}
}
+
+ ///
+ /// Gets the path to adb in the Android SDK defined in the Unity Editor preferences.
+ ///
+ ///
+ /// This function only works while in the Unity editor and returns null otherwise.
+ ///
+ /// String that contains the path to adb that the Unity editor uses.
+ public static string GetAdbPath()
+ {
+ string sdkRoot = null;
+#if UNITY_EDITOR
+ // Gets adb path and starts instant preview server.
+ sdkRoot = EditorPrefs.GetString("AndroidSdkRoot");
+#endif // UNITY_EDITOR
+
+ if (string.IsNullOrEmpty(sdkRoot))
+ {
+ return null;
+ }
+
+ // Gets adb path from known directory.
+ var adbPath = Path.Combine(Path.GetFullPath(sdkRoot),
+ Path.Combine("platform-tools", GetAdbFileName()));
+
+ return adbPath;
+ }
+
+ ///
+ /// Returns adb's executable name based on platform.
+ /// On macOS this function will return "adb" and on Windows it will return "adb.exe".
+ ///
+ /// Returns adb's executable name based on platform.
+ public static string GetAdbFileName()
+ {
+ var adbName = "adb";
+
+ if (Application.platform == RuntimePlatform.WindowsEditor)
+ {
+ adbName = Path.ChangeExtension(adbName, "exe");
+ }
+
+ return adbName;
+ }
}
}
diff --git a/Assets/GoogleARCore/SDK/Scripts/VersionInfo.cs b/Assets/GoogleARCore/SDK/Scripts/VersionInfo.cs
index 0bfc45d9..85a30d02 100644
--- a/Assets/GoogleARCore/SDK/Scripts/VersionInfo.cs
+++ b/Assets/GoogleARCore/SDK/Scripts/VersionInfo.cs
@@ -28,6 +28,6 @@ public static class VersionInfo
///
/// The current ARCore SDK version.
///
- public static readonly string Version = "1.8.0";
+ public static readonly string Version = "1.9.0";
}
}
diff --git a/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.mdb.meta b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.mdb.meta
index 5b844e1f..5e6c082e 100644
--- a/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.mdb.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.mdb.meta
@@ -1,11 +1,10 @@
fileFormatVersion: 2
guid: 1f244d0a58e4479a98c4e5d92d6e5166
labels:
-- gvh_version-1.2.100.0
- gvh
-timeCreated: 1538009133
-licenseType: Pro
+- gvh_version-1.2.100.0
DefaultImporter:
+ externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.meta b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.meta
index 1f70fe24..a5c7ffb9 100644
--- a/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.100.0.dll.meta
@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: bff1a8415a744557841645b0c3f19a6d
labels:
-- gvh_version-1.2.100.0
- gvh
- gvh_targets-editor
+- gvh_version-1.2.100.0
PluginImporter:
externalObjects: {}
serializedVersion: 2
@@ -20,7 +20,7 @@ PluginImporter:
- first:
Editor: Editor
second:
- enabled: 0
+ enabled: 1
settings:
DefaultValueInitialized: true
- first:
diff --git a/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.mdb.meta b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.mdb.meta
index 99fa7b27..871edd56 100644
--- a/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.mdb.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.mdb.meta
@@ -1,11 +1,10 @@
fileFormatVersion: 2
guid: 9aaeeb2d3bda4cc28a22c1cef438fc78
labels:
-- gvh_version-1.2.100.0
- gvh
-timeCreated: 1538009133
-licenseType: Pro
+- gvh_version-1.2.100.0
DefaultImporter:
+ externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.meta b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.meta
index 099583f1..350bce52 100644
--- a/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.100.0.dll.meta
@@ -1,34 +1,28 @@
-fileFormatVersion: 2
-guid: a5aedcdec1d2475ab58ce659af1b30c4
-labels:
-- gvh_version-1.2.100.0
-- gvh
-- gvh_targets-editor
PluginImporter:
+ assetBundleName:
+ assetBundleVariant:
+ executionOrder: {}
externalObjects: {}
- serializedVersion: 2
iconMap: {}
- executionOrder: {}
- isPreloaded: 0
isOverridable: 0
+ isPreloaded: 0
platformData:
- - first:
- Any:
+ - first: {Any: !!null ''}
second:
enabled: 0
settings: {}
- - first:
- Editor: Editor
+ - first: {Editor: Editor}
second:
enabled: 0
- settings:
- DefaultValueInitialized: true
- - first:
- Windows Store Apps: WindowsStoreApps
+ settings: {DefaultValueInitialized: true}
+ - first: {Windows Store Apps: WindowsStoreApps}
second:
enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
+ settings: {CPU: AnyCPU}
+ serializedVersion: 2
+ userData:
+fileFormatVersion: 2
+guid: a5aedcdec1d2475ab58ce659af1b30c4
+labels: [gvh, gvh_targets-editor, gvh_version-1.2.100.0]
+ssetBundleVariant:
+
diff --git a/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.mdb.meta b/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.mdb.meta
index 502fc77c..645b5511 100644
--- a/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.mdb.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.mdb.meta
@@ -1,11 +1,10 @@
fileFormatVersion: 2
guid: 9f9472ceee7d442f9c12ac9fbf80fa97
labels:
-- gvh_version-1.2.100.0
- gvh
-timeCreated: 1538009133
-licenseType: Pro
+- gvh_version-1.2.100.0
DefaultImporter:
+ externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.meta b/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.meta
index ea0d91ba..c4d56581 100644
--- a/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.meta
@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 00abe31d0e6543528774c8dbb576ac4d
labels:
-- gvh_version-1.2.100.0
- gvh
- gvh_targets-editor
+- gvh_version-1.2.100.0
PluginImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.mdb.meta b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.mdb.meta
index d158686a..941beb6f 100644
--- a/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.mdb.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.mdb.meta
@@ -1,11 +1,10 @@
fileFormatVersion: 2
guid: bf35da04684d4c88b3abd54da21b91eb
labels:
-- gvh_version-1.2.100.0
- gvh
-timeCreated: 1538009133
-licenseType: Pro
+- gvh_version-1.2.100.0
DefaultImporter:
+ externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.meta b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.meta
index 7f3d5d12..639cde31 100644
--- a/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.meta
+++ b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.100.0.dll.meta
@@ -1,34 +1,28 @@
-fileFormatVersion: 2
-guid: 3c57f9baecc8405c9c206d8b9d3ffdab
-labels:
-- gvh_version-1.2.100.0
-- gvh
-- gvh_targets-editor
PluginImporter:
+ assetBundleName:
+ assetBundleVariant:
+ executionOrder: {}
externalObjects: {}
- serializedVersion: 2
iconMap: {}
- executionOrder: {}
- isPreloaded: 0
isOverridable: 0
+ isPreloaded: 0
platformData:
- - first:
- Any:
+ - first: {Any: !!null ''}
second:
enabled: 0
settings: {}
- - first:
- Editor: Editor
+ - first: {Editor: Editor}
second:
enabled: 0
- settings:
- DefaultValueInitialized: true
- - first:
- Windows Store Apps: WindowsStoreApps
+ settings: {DefaultValueInitialized: true}
+ - first: {Windows Store Apps: WindowsStoreApps}
second:
enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
+ settings: {CPU: AnyCPU}
+ serializedVersion: 2
+ userData:
+fileFormatVersion: 2
+guid: 3c57f9baecc8405c9c206d8b9d3ffdab
+labels: [gvh, gvh_targets-editor, gvh_version-1.2.100.0]
+ssetBundleVariant:
+
diff --git a/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.100.0.txt.meta b/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.100.0.txt.meta
index ba11c111..a2a32edc 100644
--- a/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.100.0.txt.meta
+++ b/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.100.0.txt.meta
@@ -1,12 +1,11 @@
fileFormatVersion: 2
guid: 37dd0987b1c3408e835183e4f87c6f68
labels:
-- gvh_version-1.2.100.0
- gvh
- gvh_manifest
-timeCreated: 1474401009
-licenseType: Pro
+- gvh_version-1.2.100.0
TextScriptImporter:
+ externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta
new file mode 100644
index 00000000..5a8854a3
--- /dev/null
+++ b/Assets/Plugins.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 62940bd0fee6943a5a75ec71d1f4edfa
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/Android.meta b/Assets/Plugins/Android.meta
new file mode 100644
index 00000000..3d33dc83
--- /dev/null
+++ b/Assets/Plugins/Android.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a333b1bdb04644ef5a6c29b02c130661
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/LICENSE b/LICENSE
index 29743c19..5b468c05 100644
--- a/LICENSE
+++ b/LICENSE
@@ -173,3 +173,28 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+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
+
+ https://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.
diff --git a/Logs/Packages-Update.log b/Logs/Packages-Update.log
index 352a60a3..419001aa 100644
--- a/Logs/Packages-Update.log
+++ b/Logs/Packages-Update.log
@@ -1,5 +1,5 @@
-=== Thu Mar 28 23:47:09 2019
+=== Tue Apr 30 18:01:00 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -9,7 +9,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -42,7 +42,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 00:01:56 2019
+=== Tue Apr 30 18:15:45 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -52,7 +52,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -85,7 +85,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 00:16:48 2019
+=== Tue Apr 30 18:30:46 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -95,7 +95,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -128,7 +128,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 00:31:01 2019
+=== Tue Apr 30 18:45:07 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -138,7 +138,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -171,7 +171,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 00:46:44 2019
+=== Tue Apr 30 19:00:52 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -181,7 +181,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -214,7 +214,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:02:21 2019
+=== Tue Apr 30 19:17:58 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -224,7 +224,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -257,7 +257,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:18:20 2019
+=== Tue Apr 30 19:34:04 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -267,7 +267,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -300,7 +300,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:23:47 2019
+=== Tue Apr 30 19:39:31 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -310,7 +310,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -343,7 +343,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:27:22 2019
+=== Tue Apr 30 19:43:10 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -353,7 +353,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -386,7 +386,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:30:57 2019
+=== Tue Apr 30 19:46:47 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -396,7 +396,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -429,7 +429,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:34:31 2019
+=== Tue Apr 30 19:50:25 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -439,7 +439,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -472,7 +472,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:38:07 2019
+=== Tue Apr 30 19:54:04 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -482,7 +482,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -515,7 +515,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:41:51 2019
+=== Tue Apr 30 19:57:41 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -525,7 +525,7 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
@@ -558,7 +558,7 @@ The following packages were added:
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0
-=== Fri Mar 29 01:45:22 2019
+=== Tue Apr 30 20:01:19 2019
Packages were changed.
Update Mode: resetToDefaultDependencies
@@ -568,7 +568,50 @@ The following packages were added:
com.unity.purchasing@2.0.3
com.unity.ads@2.0.8
com.unity.textmeshpro@1.3.0
- com.unity.package-manager-ui@2.0.3
+ com.unity.package-manager-ui@2.0.7
+ com.unity.collab-proxy@1.2.15
+ com.unity.modules.ai@1.0.0
+ com.unity.modules.animation@1.0.0
+ com.unity.modules.assetbundle@1.0.0
+ com.unity.modules.audio@1.0.0
+ com.unity.modules.cloth@1.0.0
+ com.unity.modules.director@1.0.0
+ com.unity.modules.imageconversion@1.0.0
+ com.unity.modules.imgui@1.0.0
+ com.unity.modules.jsonserialize@1.0.0
+ com.unity.modules.particlesystem@1.0.0
+ com.unity.modules.physics@1.0.0
+ com.unity.modules.physics2d@1.0.0
+ com.unity.modules.screencapture@1.0.0
+ com.unity.modules.terrain@1.0.0
+ com.unity.modules.terrainphysics@1.0.0
+ com.unity.modules.tilemap@1.0.0
+ com.unity.modules.ui@1.0.0
+ com.unity.modules.uielements@1.0.0
+ com.unity.modules.umbra@1.0.0
+ com.unity.modules.unityanalytics@1.0.0
+ com.unity.modules.unitywebrequest@1.0.0
+ com.unity.modules.unitywebrequestassetbundle@1.0.0
+ com.unity.modules.unitywebrequestaudio@1.0.0
+ com.unity.modules.unitywebrequesttexture@1.0.0
+ com.unity.modules.unitywebrequestwww@1.0.0
+ com.unity.modules.vehicles@1.0.0
+ com.unity.modules.video@1.0.0
+ com.unity.modules.vr@1.0.0
+ com.unity.modules.wind@1.0.0
+ com.unity.modules.xr@1.0.0
+
+=== Tue Apr 30 20:04:48 2019
+
+Packages were changed.
+Update Mode: resetToDefaultDependencies
+
+The following packages were added:
+ com.unity.analytics@3.2.2
+ com.unity.purchasing@2.0.3
+ com.unity.ads@2.0.8
+ com.unity.textmeshpro@1.3.0
+ com.unity.package-manager-ui@2.0.7
com.unity.collab-proxy@1.2.15
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
diff --git a/Packages/manifest.json b/Packages/manifest.json
index bd0c3485..8392bea1 100644
--- a/Packages/manifest.json
+++ b/Packages/manifest.json
@@ -3,7 +3,7 @@
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.2.2",
"com.unity.collab-proxy": "1.2.15",
- "com.unity.package-manager-ui": "2.0.3",
+ "com.unity.package-manager-ui": "2.0.7",
"com.unity.purchasing": "2.0.3",
"com.unity.textmeshpro": "1.3.0",
"com.unity.modules.ai": "1.0.0",
diff --git a/ProjectSettings/AndroidResolverDependencies.xml b/ProjectSettings/AndroidResolverDependencies.xml
new file mode 100644
index 00000000..053fe112
--- /dev/null
+++ b/ProjectSettings/AndroidResolverDependencies.xml
@@ -0,0 +1,13 @@
+
+
+ com.google.android.gms:play-services-location:9.8.0
+
+
+ Assets/Plugins/Android/com.android.support.support-annotations-24.0.0.jar
+ Assets/Plugins/Android/com.android.support.support-v4-24.0.0.aar
+ Assets/Plugins/Android/com.google.android.gms.play-services-base-9.8.0.aar
+ Assets/Plugins/Android/com.google.android.gms.play-services-basement-9.8.0.aar
+ Assets/Plugins/Android/com.google.android.gms.play-services-location-9.8.0.aar
+ Assets/Plugins/Android/com.google.android.gms.play-services-tasks-9.8.0.aar
+
+
\ No newline at end of file
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index 1baf011d..4e32b6fb 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -241,6 +241,7 @@ PlayerSettings:
tvOSManualSigningProvisioningProfileType: 0
appleEnableAutomaticSigning: 1
iOSRequireARKit: 0
+ iOSAutomaticallyDetectAndAddCapabilities: 1
appleEnableProMotion: 0
clonedFromGUID: 00000000000000000000000000000000
templatePackageId:
diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt
index 85074f53..828e38d4 100644
--- a/ProjectSettings/ProjectVersion.txt
+++ b/ProjectSettings/ProjectVersion.txt
@@ -1 +1 @@
-m_EditorVersion: 2018.3.7f1
+m_EditorVersion: 2018.3.11f1
diff --git a/build_unity_sdk_plugins.bzl b/build_unity_sdk_plugins.bzl
index a81e2466..56d8d006 100644
--- a/build_unity_sdk_plugins.bzl
+++ b/build_unity_sdk_plugins.bzl
@@ -1,17 +1,23 @@
"""This module builds ARCore SDK for Unity dependencies and copies them into the SDK"""
-def get_target_path(info):
- if "output_regex" in info:
+def get_target_path(plugin_dependency_info):
+ if "output_regex" in plugin_dependency_info:
return "TARGET_PATH=`grep -o -e \"[^ ]*{regex}[^ ]*\" -e \"[^ ]*\\.aar\" <<<\"$(locations {target})\"`;"
else:
return "TARGET_PATH=$(locations {target});"
-def generate_copy_command(plugin_dependency_infos):
- copy_command = "".join(
+def get_copy_command(plugin_dependency_info):
+ if plugin_dependency_info.get("unzip", False):
+ return "$(location //third_party/unzip:unzip) $$TARGET_PATH -d $$temp_dir/{path};"
+ else:
+ return "cp $$TARGET_PATH $$temp_dir/{path};"
+
+def get_full_copy_command(plugin_dependency_infos):
+ full_copy_command = "".join(
[
("mkdir -p $$temp_dir/{path};" +
get_target_path(info) +
- "cp $$TARGET_PATH $$temp_dir/{path};")
+ get_copy_command(info))
.format(
path = info["sdk_path"],
target = info["target"],
@@ -21,19 +27,20 @@ def generate_copy_command(plugin_dependency_infos):
],
)
- return copy_command
+ return full_copy_command
def build_unity_sdk_plugins(name, dependency_infos, out, visibility):
plugin_dependency_build_targets = [dependency["target"] for dependency in dependency_infos]
- copy_command = generate_copy_command(dependency_infos)
+ full_copy_command = get_full_copy_command(dependency_infos)
native.genrule(
name = name,
srcs = plugin_dependency_build_targets,
outs = [out],
cmd = ("temp_dir=\"$$(mktemp -d)\";" +
- copy_command +
+ full_copy_command +
"pushd $$temp_dir; tar cvfh {out_file} *; popd;" +
"cp $$temp_dir/{out_file} $@").format(out_file = out),
visibility = visibility,
+ tools = ["//third_party/unzip:unzip"],
)