Here's an easy demo that lets you share a certain location AR using with Unity, ARFoundation, and echoAR.. The full demo can also be found on echoAR's GitHub.
If you don't have an echoAR API key yet, make sure to register for FREE at echoAR.
- Clone Unity-ARFoundation-echoAR-example repo and follow the instructions on documentation page to get your project up and running.
- Clone this repo
- In your existing project of
Unity-ARFoundation-echoAR, from the toolbar on top select
Assets > Import Package > Custom Package...
echoAR-PinLocation.unitypackagelocated in this repo and click
- From the
Projecttab in Unity, go to
Assets > AR Foundation > Scenes > PinLocation
- Open the scene
ShareButtonHandler.csfile in the same directory
- Find the
ShareLocation()function and place your API key and optional * configurations
- From the project tab, go to
Assets > AR Foundation > Scripts
PlaceOnPlane.cswith the corresponding file in this repo
- In the
Contentpage under Manage, select the option to upload new files
- Upload both files in the directory
MapPinConsoleObjectlocated in this repo
- This project utilizes Native Share for Android & iOS from the Unity Asset Store
- In your Unity project, go to
Asset Storeand download the asset above in its entirety
- Save, build and run the project just as you would for Unity-ARFoundation-echoAR
Note: These instructions assume that you are familiar with building and running the project for your desired platform (iOS, Android…) Please consult external resources if you are having difficulties in this process.
- In Build Settings, after selecting iOS, ensure that you have selected the correct scene that is
AR Foundation/Scenes/PinLocation/PinLocationAR. If this option is not available, click
Add Open Scenesand try again by looking at the end of the list.
When share button at the bottom-center of the screen is touched, user location is determined with LocationService in Unity. The location is sent within an HTTP POST request to echoAR’s API.
- In the echoAR console, go to
Datatab under Manage
locationshould be seen in the
Global databasetable on this page
echoAR (http://www.echoAR.xyz; Techstars ’19) is a cloud platform for augmented reality (AR) and virtual reality (VR) that provides tools and server-side infrastructure to help developers & companies quickly build and deploy AR/VR apps and experiences.