ARCore GeospatialAPI Unity StarterKit

SampleScenes

0-TrackingStateMonitoring

The latitude, longitude, altitude, and azimuth of your smartphone and the accuracy of these are displayed on a screen.

1-PlacingObjectAt_LatLngAlt

Show a object with AR at the latitude, longitude, and altitude specified on the Inspector in UnityEditor.

2-TapToPlace

Placement of a object and saving its latitude, longitude, and altitude and local position.
Reproduction of position of a object at the same position of the real world.
Click below to play the demo video.


Required Setup

Build Setting

[File]->[BuildSettings]
Select your development platform (Android/iOS) and click [Switch Platform].

API Key

[Edit]->[ProjectSettings]->[XR Plug-in Management]->[ARCore Extensions]
Enter an API key created on Google Cloud Platform.

See [Set up a Google Cloud Project] of the official website for how to create an API Key.
https://developers.google.com/ar/develop/c/geospatial/developer-guide

Set latitude and longitude to display objects

If you try the scene named 1-PlacingObjectAt_LatLngAlt , you need to specify the latitude, longitude and height on the VPS_Demo object inspector.
Height should be calculated as geoid height + elevation.
[GeoidCalculator]
https://geographiclib.sourceforge.io/cgi-bin/GeoidEval

[elevetion]
Please search app or web service to provide elevation at the specified point of your country.

Slide deck of tutorial

I held a tutorial event about how to use ARCore Geospatial API in Japan.
A part of tutorial was translated into English. It'll be great if it's helpful for your studying.
https://www.docswell.com/s/Tks_Yoshinaga/5664V5-geospatial-api-en