We decided to give this version of the project a different name, How to Change a Tire-ARKit. Open the project in Unity and import the ARKit plugin via the Asset Store:
- With the old Main scene open, select File | Save Scene As, and name it Main-ARKit.
- Select File | Build Settings and replace Main with Main-ARKit in the Scenes To Build.
- Switch platforms to iOS. We will let the toolkit set the other configurations.
- From Window | Asset Store, Download and Import the Apple ARKit package.
- Accept the option to let it Override Project Settings.
Let's remove the ambient lighting in the scene:
- Open the Lighting tab; Window | Lighting | Settings.
- Set Skybox Material to none (using the doughnut icon to the right of the parameter).
- Set Environment Lighting Source to Color.
- Set Lightmapping Settings Indirect Resolution to 1.
Now we set up the camera with AR components and create the ARCameraManager, as follows:
- In the Hierarchy root, Create Empty named CameraParent, and reset its Transform if necessary (Transform | gear-icon | Reset).
- Drag the Main Camera so it is a child of CameraParent, and reset its Transform too.
- With Main Camera selected, Add Component Unity AR Video.
- For its Clear Material slot, click the doughnut icon and select YUVMaterial.
- Add Component Unity AR Camera Near Far.
- In the Hierarchy root, Create Empty named ARCameraManager.
- Add Component Unity AR Camera Manager.
- Drag the Main Camera to its Camera slot.
That's it for the generic ARKit scene setup.