Setting up the project for ARKit

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:

  1. With the old Main scene open, select File | Save Scene As, and name it Main-ARKit.
  2. Select File | Build Settings and replace Main with Main-ARKit in the Scenes To Build.
  3. Switch platforms to iOS. We will let the toolkit set the other configurations.
  4. From Window | Asset Store, Download and Import the Apple ARKit package.
  5. Accept the option to let it Override Project Settings.

Let's remove the ambient lighting in the scene:

  1. Open the Lighting tab; Window | Lighting | Settings.
  2. Set Skybox Material to none (using the doughnut icon to the right of the parameter).
  3. Set Environment Lighting Source to Color.
  4. Set Lightmapping Settings Indirect Resolution to 1.

Now we set up the camera with AR components and create the ARCameraManager, as follows:

  1. In the Hierarchy root, Create Empty named CameraParent, and reset its Transform if necessary (Transform | gear-icon | Reset).
  2. Drag the Main Camera so it is a child of CameraParent, and reset its Transform too.
  3. With Main Camera selected, Add Component Unity AR Video.
  4. For its Clear Material slot, click the doughnut icon and select YUVMaterial.
  5. Add Component Unity AR Camera Near Far.
  6. In the Hierarchy root, Create Empty named ARCameraManager.
  7. Add Component Unity AR Camera Manager.
  8. Drag the Main Camera to its Camera slot.

That's it for the generic ARKit scene setup.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.9.236