Integrating the Unity Package

Add the ARwayKit Unity package to an existing Unity Project

If you have an existing Unity app follow these steps to add the .unitypackage. Otherwise, we recommend that you build from the source:

pageBuilding from the Source Code

Get the ARwayKit SDK .unitypackage

Download the .unitypackage from our GitHub. Please contact us for access.

Implementation

In the below instructions, we will be creating a new project in Unity, skip the step for creating a new project if you already have an existing Unity codebase.

Getting the Account ID and Secret Key

  1. From the ARway Creator Portal, go to "For Developers -> Create a New App -> Enter App Name".

  2. Copy your Account ID and SecretKey for that App.

The "For Developers" page of the Creator Portal

Creating a new project in Unity

If you have an existing project in Unity, skip this step.

  1. Open Unity Hub and click the "New project" button on the top right.

Create a new project in Unity hub
  1. Select the template "3D" and create your new project (Unity Version 2022.3.17f1).

    Select the 3D (Core) project template

Change Project Platform

  1. Go to "File -> Build Settings..." and select either Android or iOS and then click "Switch Platform".

Changing the build settings

Importing Packages

  1. Go to "Assets -> Import Package -> Custom Package". Then select the ARwayKit SDK .unitypackage.

  2. In the "Import Unity Package" window import the package.

    Import ARwayKit SDK package in Unity
  3. Next, the package setup will begin. Click "Install Packages" to install all of the required packages.

ARwayKit SDK Setup
  1. Wait for the packages to install and for the scripts to compile.

  2. In the warning pop-up for enabling the backends for the input system package, select either "Yes" or "No" as it is optional for the ARwayKit SDK.

Choose 'Yes' or 'No' as it is optional for the ARwayKit SDK
  1. Then click 'Setup SDK' to finish part 2/2 for the setup.

Click Setup SDK
  1. Next, import the project settings. Please note that this will overwrite all of your previous project settings.

Import project settings
  1. In the Import Unity Package window, select all and click "Next" then "Import".

Unity Package Window files
Unity Package Window settings

Adding the Scenes to the Build

  1. Open the Dashboard-SDK scene. Under in the Project tab go to "Assets -> ARWay -> ViewerMode -> 0_Scene" and double-click Dashboard-SDK.

  2. Then open "File -> Build Settings..." and click the "Add Open Scenes" button to add the scene to the build.

Build Settings
  1. Then do the same for ARMapSession scene "Assets -> ARWay -> ViewerMode -> 0_Scene" and double-click ARMapSession.

  2. Then open "File -> Build Settings..." and click the "Add Open Scenes" button to add the scene to the build.

  3. Now both Dashboard-SDK and ARMapSession should be in the "Scenes in Build". Ensure that Dashboard-SDK is the top scene in the build.

Build Settings

Adding the Account ID and Secret Key

  1. In the Project Window, go to "Assets -> ARWay -> ViewerMode -> Resources -> ARWayKitConfig
" and add your credentials for the Account ID and Secret Key.

Add credentials in the ARway config file

Updating the Addressables Groups

  1. Navigate to "Window -> Asset Management -> Addressable -> Groups".

  2. In the Addressables Groups window, click on "Build -> New Build -> Default Build Script".

When making any changes that affect localization strings, you will need to update the Addressables Groups "Build -> New Build -> Default Build Script".

Building the App

  1. In Unity select "File -> Build Settings -> Build -> Select iOS/Android -> Build and Run" to run the app.

Build Settings screen in Unity

After successfully building the app on your device, you can scan QR codes that you created for your ARway maps in the Creator Portal.

Last updated