Integrating Unity Packages
Add ARwayKit Unity packages in a Unity Project
Step 1: Go to "For Developers -> Create a New App -> Enter App Name".
Step 2: Copy your Account ID and SecretKey for that App.
Step 3: Open Unity hub and setup on New Project in 3D Template (Unity Version 2021.3.10f1)
Create a new project in Unity hub
Step 4: Open Unity Project and Go to "Assets -> Import Package -> Custom Package". Then select the ARwayKit SDK .unitypackage.
import ARwayKit SDK package in Unity
Step 5: From the Package Manager, "Window -> Package Manager", add the following packages:
- ARFoundation (4.2.7)
- ARCore XR Plugin (4.2.7)
- ARKit XR Plugin (4.2.7)
- XR Interaction Toolkit (2.0.4)
- TextMeshPro (3.0.6)
- Then import "TMP Essential Resources", from the "Window -> TextMeshPro -> Import TMP Essential Resources" menu option
Import all required packages
Step 6: In "File -> Build Settings -> Player Settings -> Settings for Windows, Mac, Linux -> Other Settings" then check the box for "Allow 'unsafe' code", then restart the Unity Project (you will be prompted to do so).
Update Player settings
Step 7: Open the two scenes, ARMapSession.unity and Dashboard.unity, from "File -> Open Scene -> Assets-> ARwayKitSDK -> SampleApp -> 0_Scene".
Add the scenes to the build settings from "File -> Build Settings" -> Add Open Scenes". Ensure that "ARwayKitSDK/SampleApp/0_Scene/ARMapSession" and "ARwayKitSDK/SampleApp/0_Scene/Dashboard" are both selected.
Update build settings with required scenes
Step 8: In "File -> Build Settings -> Player Settings -> iOS Settings -> Other Settings" and modify the Bundle Identifier so that it is unique and matches the domain name of your organization in reverse order.
Enable "Identification -> Automatically Sign", then set the following usage descriptions.
- Camera Usage Description*: Used for AR Content and mapping
- Microphone Usage Description*: Used for creating audio content
- Location Usage Description*: Used to attach maps with global coordinates and public map searching
Update player settings
Step 9: In the Project Window, go to "Assets -> ARwayKitSDK -> Resource-> ARWayKitConfig " and add your credentials for the Account ID and Secret Key.
Add credentials in the ARway config file
Step 10: For Android Only disable the Graphic API and remove the Vulkan -Minimum API Level 25 and Disable Metal API Validation and Multi-thread rendering for both platforms.
Android specific build settings
Step 11: In Unity select "File -> Build Settings -> Build -> Select iOS/Android -> Build and Run" to run the app.