Installing the Lightship Maps SDK
To use Lightship Maps for Unity, you must download the Lightship Maps SDK Unity package and save it to your computer. The Unity package comes as a compressed tarball that you can add to a Unity project directly via the Package Manager.
Use your Lightship.dev Account
You will need an account on https://lightship.dev to download the package and 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. If you already have an account, skip to the next section and sign in when prompted.
Downloading the Maps SDK
- Navigate to https://lightship.dev/account/downloads.
- Select Maps SDK.
- Click the Download Maps SDK (v0.4.0) button.
- This will download
com.niantic.lightship.maps-0.4.0.tgzto your machine.
Installing the Maps SDK into a New Unity Project
Install Unity 2021.3.17f1 LTS or later.
Download the project template for 3D (URP) Core.
Create a new Project.
Choose the 3D (URP) Core template.Important!
If you want to use 3D Mobile, you will need to add URP support to your project via the Package Manager.
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 SDK, select it, and press Open. This will install the package in your project's Packages folder as the Lightship Maps SDK folder.
Adding your API Key to your Unity Project
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.caution
Upon playing a scene with the
LightshipMapprefab, 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.