Installing the Lightship Maps SDK
To use Lightship Maps for Unity, you must install the Lightship Maps SDK Unity package using the Unity Package Manager. The package is available via direct download as a compressed tarball archive or via GitHub.
Installing the Lightship Maps SDK via Github URL
- Create a new Unity project with the 3D (Core) template.
- In your Unity project open the Package Manager by selecting Window > Package Manager
- From the plus menu on the Package Manager tab, select Add package from git URL...
- Enter
https://github.com/niantic-lightship/maps-upm.git
Click Yes to activate the new Input System Package for AR Foundation 5.0 (if prompted)
Installing the Lightship Maps SDK via Direct Download
- Download the plugin packages (
.tgz
) from the latest release. - In your Unity project open the Package Manager by selecting Window > Package Manager
- From the plus menu on the Package Manager tab, select Add package from tarball...
- Navigate to where you downloaded the Maps UPM, select the
.tgz
file you downloaded, and press Open. This will install the package in your project's Packages folder as the Niantic Lightship Maps SDK. Click Yes to activate the new Input System Package for AR Foundation 5.0 (if prompted)
Use your Lightship.dev Account
You will need an account on https://lightship.dev to supply an API key for the Maps SDK to use. If you do not have an account, go to https://lightship.dev/signin/create-account to create one.
Adding your API Key to your Unity Project
-
Visit lightship.dev.
-
Sign in and visit the Projects section. Select an existing project or create a new one with New Project.
-
Under your project Overview, click the copy icon next to your API Key.
-
Open the API Key Helper in Unity by selecting Lightship > Maps SDK > API Key Helper.
-
In the API Key Helper, if your Current API Key is blank, or you want to replace it with the key you just copied, paste the new key next to Lightship API Key and press Setup.
-
If you get the message "Lightship API Key has been set correctly", press OK.
Upon playing a scene with the LightshipMap
prefab, if the Lightship API key is not set to a valid key, an invalid-key notification window will appear and then the API Key Helper will open for you to enter a valid key.