Setting Up the Niantic SDK for Unity
To set up the SDK, you will download and install Unity, then install the ARDK Unity packages and set up Unity for the platform your AR experience will run on. After that, you will authenticate Lightship in Unity with your API key, perform any additional setup your platform device requires, and set up the basic requirements for an AR scene in Unity.
The Lightship Magic Leap 2 integration is in beta, so some features may not work as expected.
Download and Install Unity
Download Unity. We support Unity 2022 LTS (with 2022.3.37f1) and 2021 LTS (with 2021.3.37f1).
Unity 2022 LTS users will need to manually upgrade Visual Scripting from 1.9.0 to 1.9.1 or higher via the Package Manager to avoid a SessionStateChangedEventUnit error.
Create a Project and Install ARDK
- Android
- iOS
- Magic Leap 2
Create a Project and Install ARDK
- Create a new Unity project with the Universal 3D (Core) template.
- In your Unity project, open the Window top menu, then select Package Manager.
- From the plus menu on the Package Manager tab, select Add package from git URL....
- Enter
https://github.com/niantic-lightship/ardk-upm.git
.- If prompted, click Yes to activate the new Input System Package for ARFoundation 5.0. This may require a restart of the Unity Editor.
- To add the SharedAR package, repeat these steps using the following URL instead:
https://github.com/niantic-lightship/sharedar-upm.git
.
To use a specific ARDK version, download its .tgz
from our release pages (ardk-upm, sharedar-upm). Then, follow the installation instructions above and select "Add package from tarball" instead of the Git URL.