Files
Bachelor-Arbeit-Adrian-Haefner/Library/PackageCache/com.unity.xr.arkit@58a677f717be/Documentation~/project-configuration-arkit.md
adriadri6972 d3d9c5f833 upload project
2025-07-31 15:21:08 +02:00

7.5 KiB
Raw Blame History

uid
uid
arkit-project-config

Project configuration

Use the XR Plug-in Management settings to configure the Apple ARKit plug-in for your project.

To get started, follow the instructions in Enable the ARKit plug-in. This also installs the ARKit package, if needed. Once installed and enabled, you can configure your project settings as described in the ARKit Project settings section.

You can review the Project validation section of the XR Plug-in Management settings to discover if any setting values are incompatible with ARKit.

ARKit Project settings

Some ARKit features require specific Unity Project settings to function properly. The settings include:

Enable the Apple ARKit plug-in

To use ARKit, you must enable the plug-in in your XR Plug-in Management settings. (Installing the package from the Package Manager doesn't automatically enable the plug-in.)

Note

Enabling ARKit also installs the package, if necessary. However, disabling ARkit doesn't uninstall the package.

You must install the iOS Module using the Unity Hub before you can enable the ARKit plug-in. Refer to the Add modules section of the Unity Hub documentation for instructions.

To enable ARKit:

  1. Open the Project Settings window (menu: Edit > Project Settings).

  2. Select XR Plug-in Management to view the plug-in management settings.

  3. Select the iOS tab to view the iOS settings. (This tab is only shown when you have installed the Editor iOS Module.)

  4. Enable the ARKit option in the Plug-in Providers list.

    XR Plug-in Management
    Enabling ARKit

Set the Target minimum iOS Version

The minimum version of iOS that supports ARKit is iOS 11.

To change this setting:

  1. Open the Project Settings window (menu: Edit > Project Settings).
  2. Select Player on the left to view the Player Settings page.
  3. Select the iOS tab to view the iOS settings.
  4. Open the Other Settings group (if necessary).
  5. Scroll down to the Configuration section.
  6. Set the Target minimum iOS Version field to 11.0 or higher.

Refer to Apple's Verifying Device Support and User Permission for additional information.

Set the Camera Usage Description

The camera usage description is a message that tells the user why your app is requesting access to the devices camera. The string assigned to this field is added to your app's Info.plist file for the NSCameraUsageDescription key.

To set or change this setting:

  1. Open the Project Settings window (menu: Edit > Project Settings).
  2. Select Player on the left to view the Player Settings page.
  3. Select the iOS tab to view the iOS settings.
  4. Open the Other Settings group (if necessary).
  5. Scroll down to the Configuration section.
  6. Enter the desired string in the Camera Usage Description field.

Refer to Apple's Handle User Consent and Privacy for additional information.

Enable the Face tracking subsystem

To use ARKit's face tracking features, you must enable the ARKit face tracking subsystem in your XR Plug-in Management settings.

You must install the ARKit package before enabling ARKit face tracking. Refer to Apple ARKit plug-in enabled for instructions.

To enable ARKit face tracking:

  1. Open the Project Settings window (menu: Edit > Project Settings).
  2. Click XR Plug-in Management on the left to open the plug-in provider list.
  3. Select ARKit in the list to view the ARKit plug-in settings page.
  4. Check the box next to Face Tracking to enable the feature.

Set the ARKit support requirement

If your app can't function without ARKit support, you can prevent it from being installed on devices without ARKit support by setting the ARKit plug-in Requirement setting to Required. Alternately, if your app works with or without ARKit, you can set the Requirement setting to Optional.

When you require ARKit, the arkit key is added to the UIRequiredDeviceCapabilities section of your app's Info.plist file. Refer to Apple's Verifying Device Support and User Permission for additional information.

You must install the ARKit package before you can change the ARKit requirement setting. Refer to Enable the Apple ARKit plug-in for instructions.

To change this setting:

  1. Open the Project Settings window (menu: Edit > Project Settings).

  2. Click XR Plug-in Management on the left to open the plug-in provider list.

  3. Select ARKit in the list to view the ARKit plug-in settings page.

    ARKit Settings
    ARKit plug-in settings

  4. For Requirement, choose either Optional or Required.

Note

The Apple ARKit plug-in Requirement overrides the similar iOS Player setting, Requires ARKit support. When you have the ARKit plug-in installed, Unity ignores the Player Requires ARKit support setting and uses the plug-in Requirement value.

Project validation

The Apple ARKit package defines a set of rules for the Project Validation system. These rules check for possible mistakes in the project configuration.

Some rules serve as warnings for possible configuration problems; you aren't required to fix these. Other rules flag configuration errors that might result in your app failing to build or not working once built. You must fix these errors.

To review the ARKit project validation rules:

  1. Open the Project Settings window (menu: Edit > Project Settings).
  2. Click XR Plug-in Management on the left to open the plug-in provider list.
  3. Select Project Validation in the list to view the validation page.
  4. Select the iOS tab to view the status of the validation checks for iOS XR plug-ins, including ARKit.

Rules that pass validation aren't shown unless you enable Show all.

Some rules provide a Fix button that updates the configuration so that the rule passes validation. Other rules provide an Edit button that takes you to the relevant setting so that you can make the necessary adjustments yourself.

You can enable Ignore build errors to bypass the pre-build validation check. However, any misconfigured features in your app might not work at runtime.

Project Validation ARKit
The iOS Project Validation section of the XR Plug-in Management page