Skip to content

Commit

Permalink
ARCore Extensions SDK v1.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Dibble committed Aug 17, 2023
1 parent 8c310cd commit 92e1dbf
Show file tree
Hide file tree
Showing 41 changed files with 307 additions and 210 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dependencies>
<iosPods>
<iosPod name="ARCore/CloudAnchors" version="~> 1.38.0" minTargetSdk="11.0">
<iosPod name="ARCore/CloudAnchors" version="~> 1.39.0" minTargetSdk="11.0">
</iosPod>
</iosPods>
</dependencies>
2 changes: 1 addition & 1 deletion Editor/BuildResources/ARCoreiOSDependencies.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dependencies>
<iosPods>
<iosPod name="ARCore/GARSession" version="~> 1.38.0" minTargetSdk="11.0">
<iosPod name="ARCore/GARSession" version="~> 1.39.0" minTargetSdk="11.0">
</iosPod>
</iosPods>
</dependencies>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dependencies>
<iosPods>
<iosPod name="ARCore/Geospatial" version="~> 1.38.0" minTargetSdk="11.0">
<iosPod name="ARCore/Geospatial" version="~> 1.39.0" minTargetSdk="11.0">
</iosPod>
</iosPods>
</dependencies>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
//
// </copyright>
//-----------------------------------------------------------------------

namespace Google.XR.ARCoreExtensions.GeospatialCreator.Editor.Internal
{
using System;
Expand Down Expand Up @@ -52,10 +51,14 @@ public override void OnInspectorGUI()

GUIContent altitudeTypeLabel = new GUIContent("Altitude Type");
EditorGUILayout.PropertyField(_altitudeType, altitudeTypeLabel);
ARGeospatialCreatorAnchor.AltitudeType altitudeType;

altitudeType = anchor.AltType;

using (new EditorGUI.IndentLevelScope())
{
if (anchor.AltType == ARGeospatialCreatorAnchor.AltitudeType.Terrain ||
anchor.AltType == ARGeospatialCreatorAnchor.AltitudeType.Rooftop)
if (altitudeType == ARGeospatialCreatorAnchor.AltitudeType.Terrain ||
altitudeType == ARGeospatialCreatorAnchor.AltitudeType.Rooftop)
{
_altitudeOffset.doubleValue = EditorGUILayout.DoubleField(
"Altitude Offset",
Expand All @@ -64,15 +67,15 @@ public override void OnInspectorGUI()

_altitude.doubleValue =
EditorGUILayout.DoubleField("WGS84 Altitude", _altitude.doubleValue);
if (anchor.AltType == ARGeospatialCreatorAnchor.AltitudeType.Terrain)
if (altitudeType == ARGeospatialCreatorAnchor.AltitudeType.Terrain)
{
EditorGUILayout.HelpBox("WGS84 Altitude is only used in the editor to " +
"display altitude of the anchored object. At runtime Altitude Offset is " +
"used to position the anchor relative to the terrain.",
MessageType.Info,
wide: true);
}
else if (anchor.AltType == ARGeospatialCreatorAnchor.AltitudeType.Rooftop)
else if (altitudeType == ARGeospatialCreatorAnchor.AltitudeType.Rooftop)
{
EditorGUILayout.HelpBox("WGS84 Altitude is only used in the editor to " +
"display altitude of the anchored object. At runtime Altitude Offset is " +
Expand All @@ -82,6 +85,7 @@ public override void OnInspectorGUI()
}
}


if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
Expand All @@ -99,4 +103,3 @@ private void OnEnable()
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ namespace Google.XR.ARCoreExtensions.GeospatialCreator.Editor.Internal
using UnityEditor;
using UnityEngine;

/// <summary>
/// ARGeospatialCreatorOriginEditor
///
/// The GUI for ARGeospatialCreatorOrigin,
/// It looks like this go/prototype-geospatial-creator-gui-design.
/// </summary>
[CustomEditor(typeof(ARGeospatialCreatorOrigin))]
internal class ARGeospatialCreatorOriginEditor : Editor
{
Expand All @@ -49,6 +55,11 @@ public static string ApiKeyFromTilesetUrl(string url)
return string.Empty;
}

/// <summary>
/// OnInspectorGUI()
///
/// function that is called every GUI update when the target object get updated.
/// </summary>
public override void OnInspectorGUI()
{
serializedObject.Update();
Expand All @@ -69,9 +80,54 @@ public override void OnInspectorGUI()
GUIForMissingReference(origin);
}


serializedObject.ApplyModifiedProperties();
}

/// <summary>Finds the 3d tiles Application Key from the origin.</summary>
/// <param name = "origin">A ARGeospatialCreatorOrigin that has a Cesium3DTileset child.
/// </param>
/// <returns>The key extracted.</returns>
internal static string Get3DTilesApiKey(ARGeospatialCreatorOrigin origin)
{
#if !ARCORE_INTERNAL_USE_CESIUM
throw new Exception("Cannot get Map Tiles API key; Cesium dependency is missing.");
#else // need to use #else block to avoid unreachable code failures
Cesium3DTileset tileset =
origin.gameObject.GetComponentInChildren(typeof(Cesium3DTileset))
as Cesium3DTileset;
if (tileset == null)
{
return "";
}
return ApiKeyFromTilesetUrl(tileset.url);
#endif
}

private static void Set3DTileApiKey(ARGeospatialCreatorOrigin origin, string key)
{
#if !ARCORE_INTERNAL_USE_CESIUM
throw new Exception("Cannot set Map Tiles API key; Cesium dependency is missing.");
#else // need to use #else block to avoid unreachable code failures
Cesium3DTileset tileset =
origin.gameObject.GetComponentInChildren(typeof(Cesium3DTileset))
as Cesium3DTileset;
if (tileset == null)
{
Debug.LogError(
"Attempted to set Map Tiles API key on a missing Cesium3DTileset component.");
return;
}
String url = String.IsNullOrEmpty(key) ? "" : TilesApiUrl(key);
if (url != tileset.url)
{
Undo.RecordObject(tileset, "Update Map Tiles API key ");
tileset.url = url;
EditorUtility.SetDirty(tileset);
}
#endif
}

// Helper that returns the URL for the tiles API for the given key
private static string TilesApiUrl(string apiKey)
{
Expand Down Expand Up @@ -170,48 +226,7 @@ private void AddGeoreference(ARGeospatialCreatorOrigin origin)
georeference.tag = "EditorOnly";
tilesetObject.tag = "EditorOnly";
Undo.RegisterCreatedObjectUndo(georeference, "Create Cesium Georeference");
#endif
}

private string Get3DTilesApiKey(ARGeospatialCreatorOrigin origin)
{
#if !ARCORE_INTERNAL_USE_CESIUM
throw new Exception("Cannot get Map Tiles API key; Cesium dependency is missing.");
#else // need to use #else block to avoid unreachable code failures
Cesium3DTileset tileset =
origin.gameObject.GetComponentInChildren(typeof(Cesium3DTileset))
as Cesium3DTileset;
if (tileset == null)
{
return "";
}
return ApiKeyFromTilesetUrl(tileset.url);
#endif
}

private void Set3DTileApiKey(ARGeospatialCreatorOrigin origin, string key)
{
#if !ARCORE_INTERNAL_USE_CESIUM
throw new Exception("Cannot set Map Tiles API key; Cesium dependency is missing.");
#else // need to use #else block to avoid unreachable code failures
Cesium3DTileset tileset =
origin.gameObject.GetComponentInChildren(typeof(Cesium3DTileset))
as Cesium3DTileset;
if (tileset == null)
{
Debug.LogError(
"Attempted to set Map Tiles API key on a missing Cesium3DTileset component.");
return;
}
String url = String.IsNullOrEmpty(key) ? "" : TilesApiUrl(key);
if (url != tileset.url)
{
Undo.RecordObject(tileset, "Update Map Tiles API key");
tileset.url = url;
EditorUtility.SetDirty(tileset);
}
#endif
}
}
}

1 change: 0 additions & 1 deletion Editor/GeospatialCreator/Scripts/Internal/GeoMath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,3 @@ public static double4x4 CalculateEnuToEcefTransform(GeoCoordinate originPoint)
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
namespace Google.XR.ARCoreExtensions.GeospatialCreator.Editor.Internal
{
using System;
using System.Collections.Generic;
using Google.XR.ARCoreExtensions.GeospatialCreator.Internal;
#if ARCORE_INTERNAL_USE_UNITY_MATH
using Unity.Mathematics;
Expand Down Expand Up @@ -64,7 +63,7 @@ static GeospatialAnchorUpdater()

// :TODO b/278071434: Make the Origin a property of the anchor instead of finding it. This
// implementation is inefficient to do on each Editor Update, but will be replaced soon.
private static GeoCoordinate FindOriginPoint()
public static GeoCoordinate FindOriginPoint()
{
ARGeospatialCreatorOrigin[] origins =
GameObject.FindObjectsOfType<ARGeospatialCreatorOrigin>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// </copyright>
//-----------------------------------------------------------------------


namespace Google.XR.ARCoreExtensions.GeospatialCreator.Editor.Internal
{
using System;
Expand Down Expand Up @@ -71,4 +70,3 @@ private static GameObject CreateObject(
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
namespace Google.XR.ARCoreExtensions.GeospatialCreator.Editor.Internal
{
using System;
using System.Collections.Generic;
using Google.XR.ARCoreExtensions.GeospatialCreator.Internal;
using UnityEditor;
using UnityEngine;
Expand Down Expand Up @@ -77,4 +76,3 @@ private void EditorUpdate()
}

#endif // ARCORE_INTERNAL_GEOSPATIAL_CREATOR_ENABLED

1 change: 0 additions & 1 deletion Editor/GeospatialCreator/Scripts/Internal/MatrixStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,3 @@ public double4 MultPoint(double4 v)
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public override void OnGUI(string searchContext)
{
IOSSupportHelper.UpdateIOSScriptingDefineSymbols(
ARCoreExtensionsProjectSettings.Instance);

GeospatialCreatorHelper.OnToggle(
ARCoreExtensionsProjectSettings.Instance.GeospatialEditorEnabled);
ARCoreExtensionsProjectSettings.Instance.Save();
Expand Down
1 change: 0 additions & 1 deletion Editor/Scripts/Internal/GeospatialCreatorEnabledWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,3 @@ static WizardStyles()
}
}
}

1 change: 0 additions & 1 deletion Editor/Scripts/Internal/GeospatialCreatorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,3 @@ private static HashSet<string> GetCurrentSymbolSet(BuildTargetGroup target)
}
}
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------
// <copyright file="CustomizedManifestInjection.cs" company="Google LLC">
//
// Copyright 2020 Unity Technologies All Rights Reserved.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Google ARCore Extensions for AR Foundation
Google ARCore Extensions and Geospatial Creator for Unity's AR Foundation
==========================================
Copyright 2019 Google LLC

Expand Down
1 change: 0 additions & 1 deletion Runtime/GeospatialCreatorRuntime/Scripts/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(
"Google.XR.ARCoreExtensions.GeospatialCreator.Editor")]

Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,3 @@ private IEnumerator ResolveRooftopAnchor(ARAnchorManager anchorManager)
#endif // !UNITY_EDITOR
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
namespace Google.XR.ARCoreExtensions.GeospatialCreator.Internal
{
using System;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;

/// <summary>
Expand All @@ -44,4 +41,3 @@ internal virtual void Update()
#endif // UNITY_EDITOR
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ namespace Google.XR.ARCoreExtensions.GeospatialCreator.Internal
using System;

using Google.XR.ARCoreExtensions.Internal;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;

/// <summary>
Expand All @@ -45,4 +42,3 @@ public class ARGeospatialCreatorOrigin : ARGeospatialCreatorObject
#endif
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
namespace Google.XR.ARCoreExtensions.GeospatialCreator.Internal
{
using System;
using System.Collections.Generic;
using UnityEngine;

/// <summary> Immutable class representing a specific lat/lon/altitude.</summary>
Expand Down Expand Up @@ -54,4 +53,3 @@ public double Altitude
}
}
}

Binary file modified Runtime/Plugins/ARPresto.aar
Binary file not shown.
Binary file modified Runtime/Plugins/arcore_client.aar
Binary file not shown.
Loading

0 comments on commit 92e1dbf

Please sign in to comment.