A simple AR demonstration using the AR+GPS Location package from the Unity Store. The goal of this project is to demonstrate how latitude and longitude GPS coordinates from a device or user input can be used in AR applications.
- Unity3D 2020.3.8 (LTS)
- AR+GPS Location
- Clone this repository into an empty directory.
- Paste the
ARLocation
folder into theAssets/
directory of the Unity project. - Open the project on Unity3D ver. 2020.3.8. (If Unity prompts you to start in safe mode, leave an issue.)
- Change Game View aspect ratio to 1920x1080 portrait. In
File/Build Settings
change platform to Android. - Connect Android device, then Build & Run to device.
- Create landmarks in AR by inputting latitude and latitude coordinates. Save these coordinates with labels and a menu.
- Find your current location with the press of a button.
- Click on landmarks to see their text descriptions.
- Toggle UI on and off so that you can see landmarks onscreen more clearly.
Generates new landmarks using the AR+GPS Location package, given a latitude, longitude, and label into the UI input fields. Adds new landmark entries into the UI dropdown menu, and allows the user to retrieve latitude and longitude through selection from the menu.
Prompts the user for permission to access the Android device's GPS (fine location) and camera.
Using the Android device's GPS, retrieve the user's latitude and longitude and display them on the UI input fields.
Assigns default to new landmarks. Can potentially be expanded to retrieve text descriptions from API.
Trigger display of landmark description with touch.
Hide or display UI elements.