Skip to main content

Migration Guide

Migrating an ARDK 2.X Project to 3.0

To upgrade an existing project:

  1. Follow the instructions at Installing ARDK 3.0, stopping after step 3.
  2. Clean up redundancies in your code, such as deleting protobuf and telemetry plugins in ARDK 2.X.
  3. Complete the ARDK 3.0 installation steps, starting from step 4.
  4. Replace 2.X managers (such as ARSession) with 3.0 managers. See the Manager Conversion Guide for a list of 2.X managers and their 3.0 counterparts.
  5. Replace references to Niantic.ARDK in scripts with the relevant Niantic.Lightship references.
  6. Once you have converted everything and your project compiles, delete the old ARDK folder.

Manager Conversion Guide

ARDK 2.X ComponentARDK 3.0 Component
ARSessionManagerARSession + ARCameraManager
ARRenderingManagerARCameraManager + ARCameraBackground
ARCameraPositionHelperTrackedPoseDriver
ARDepthManagerAROcclusionManager (+ LightshipOcclusionExtension)
ARDepthInteroplationAdapterLightshipOcclusionExtension
ARMeshManagerARMeshManager (+ LighsthipMeshingExtension)
ARSemanticSegmentationManagerARSemanticSegmentationManager (+ LightshipOcclusionExtension)
GameboardManagerLightshipNavMeshManager

Feature Conversion Guide

1. Session Management

In ARDK 2.X, AR session management was handled by an ARDK MonoBehaviour component called ARSessionManager.

In ARDK 3.0, AR session management is handled by AR Foundation in a MonoBehaviour component called ARSession. For more information on how to set up a basic AR scene using the ARSession component, see How to Setup an AR Scene. For more information, see Unity’s documentation.

2. Rendering

In ARDK 2.X, rendering was handled by an ARDK MonoBehaviour component called ARRenderingManager.

In ARDK 3.0, rendering is handled by AR Foundation. The device camera is handled by a MonoBehaviour component called ARCameraManager. The composition of the camera frame and CG content is handled by a MonoBehaviour component called ARCameraBackground. For more information, see Unity Camera Components (opens in new window).

ARDK 2.XARDK 3.0
[ARSessionManager] IsLightEstimationEnabled[ARCameraManager] LightEstimation
[ARSessionManager] IsAutoFocusEnabled[ARCameraManager] AutoFocus
[ARRenderingManager] RenderTargetAlways set to Camera
[ARRenderingManager] CameraAlways the camera with the ARCameraManager

3. Depth / Occlusion

In AR, depth textures are used to dynamically occlude digital content.

In ARDK 2.X, depth textures were exposed through the ARDepthManager. Depth interpolation was done in the ARDepthInterpolationAdapter and semantic suppression of depth-based occlusion was set up in the ARSemanticSegmentationManager.

In ARDK 3.0, depth-based occlusion is handled by the AROcclusionManager provided by AR Foundation. Additional ARDK occlusion settings are now all enabled through the LightshipOcclusionExtension, such as interpolation modes, occlusion suppression, and occlusion stabilization.

ARDK 2.XARDK 3.0
[ARDepthManager] KeyFrameFrequency[LightshipOcclusionExtension] TargetFrameRate
[ARDepthManager] OcclusionModeAlways using DepthBuffer in ARCameraBackground
[ARDepthManager] StabilizeOcclusionExperimental[LightshipOcclusionExtension] OcclusionStabilization
[ARDepthManager] PreferSmootherEdgesNot supported yet
[ARDepthManager] InterpolationDepth buffer always returned interpolated
[ARDepthInterpolationAdapter] Mode
- SampleFullScreen
- TrackOccludee
[LightshipOcclusionExtension] Mode
- Static
- SpecifiedGameObject
[ARDepthManager] Occludee[LightshipOcclusionExtension] PrincipalOccludee

4. Semantics

In ARDK 3.0, semantics are still handled by the ARSemanticSegmentationManager. The new manager offers functions to get packed semantics and confidence values per channel without having to prepare confidence channels. Interpolation can be done with a SamplerMatrix that is returned with every semantic frame. Semantic depth suppression settings have been moved to the LightshipOcclusionExtension.

ARDK 2.XARDK 3.0
KeyFrameFrequencyTargetFrameRate
DepthSuppressionChannels[LightshipOcclusionExtension] SuppressionChannels
PersistentConfidencesNow direct access through the manager
InterpolationDone with SamplerMatrix (see samples)

5. Meshing

In ARDK 3.0, Meshing is exposed through a MonoBehaviour component called ARMeshManager, now provided by AR Foundation. In addition, ARDK-specific settings can be changed through the LightshipMeshingExtension component. The settings from ARDK 2.x are still included, but some are renamed:

ARDK 2.XARDK 3.0
[ARMeshManager] FrameRate[LightshipMeshingExtension] TargetFrameRate
[ARMeshManager] FrameRateTargetBlockSize[LightshipMeshingExtension] MeshBlockSize
[ARMeshManager] MeshingRangeMax[LightshipMeshingExtension] MaximumIntegrationDistance
[ARMeshManager] VoxelSize[ARMeshManager] VoxelSize
[ARMeshManager] MeshPrefab[ARMeshManager] MeshPrefab
[ARMeshManager] MeshRootFixed to XROrigin -> CameraOffset -> Trackables
[ARMeshManager] FrameRateColliderUpdateThrottle[ARMeshManager] Handled by ConcurrentQueueSize
[ARMeshManager] MeshVisibilitySettingsSet via prefab material directly

6. Gameboard / LightshipNavMesh

The Gameboard feature from ARDK 2.X has been renamed to LightshipNavMesh in ARDK 3.0.

The implementation is the same, but visualization is now handled by an additional component called LightshipNavMeshRenderer.

7. VPS Coverage

VpsCoverageExampleManager has been reworked into the CoverageClientManager Component. Private AR locations can now be added through an ARLocationManifest instead of a VpsCoverageResponse object.

ARDK 2.XARDK 3.0
[VpsCoverageExampleManager] CoverageClientRuntimeAlways calls live service
[VpsCoverageExampleManager]
MockResponses (ScriptableObject)
[CoverageClientManager]
PrivateARLocations (ARLocationManifest)
[VpsCoverageExampleManager] SpoofLocation
- Lat_degrees
- Lon_degrees
[CoverageClientManager] SpoofLocationUseCurrentLocation
- QueryLatitude
- QueryLongitude
[CoverageClientManager] VoxelSizeTargetImageThe [CoverageClientManager] is not tied to a sample anymore