Build your scene for iOS using Xcode or directly for Android
AR Controller beta release 0.7.0 (2022-06-25)
Table of contents
Build your Unity project as an iOS or Android app
Note: Xcode build for iOS is only available on Mac
-
Open /Packages/AR Controller Beta SDK/Demo/ARControllerShowcase/ARControllerShowcase.unity in the Unity Editor
-
Open Build Settings (File -> Build Settings…)
-
Add ARControllerExample.unity to the ‘Scenes In Build’ list (click Add Open Scenes in Build Settings, if necessary)
-
Ensure ARControllerShowcase is the only scene included in the build (only the ARControllerShowcase checkbox should be ticked)
-
Ensure either iOS or Android platform is selected - be sure to click Switch Platforms to confirm platform changes
-
Plug your mobile device into your computer
-
Android only: Click Build and Run to deploy straight to your device
-
iOS only: Click Build
-
Choose a name for the build directory (this can be whatever you like; a new name can be chosen each time if you would like to distinguish each build)
-
iOS only: Wait for Unity to finish compiling (the build directory will usually open)
-
iOS only: From the build directory, open the Xcode project - open Unity-iPhone.xcworkspace (or Unity-iPhone.xcodeproj)
-
iOS only: Provide a unique bundle identifier to ensure your demo build does not get overwritten by future builds (e.g. com.yourcompany.ARControllerdemotest1)
-
iOS only: Compile onto your phone with your usual Xcode settings (it should be safe to use Xcode as usual from this point)
Running the demo
- Run the app ensuring that you grant it access to the device camera and location when prompted
-
The built app can be interacted with in a similar manner to how you used the Game view in the Unity Editor, noting the following additional points:
- Additional calibration conditions must be adhered to when calibrating
- You must scan the ground with your phone camera - you will be instructed onscreen for this until it is sufficiently scanned
- You must scan other key environmental features (e.g. tables, chairs) before you will be able to interact with them
- If you have created additional scenes, you will need to adapt this build process as appropriate to include them (e.g. add them to Scenes In Build in the Build Settings in addition to or instead of ARControllerExample.unity). If you have used additional libraries, you may need to modify build settings to account for those