[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Unity project setup\n\nThis guide details the recommended editor versions, graphics settings, URP\nsettings, and Android project settings when developing a Unity application for\nAndroid XR.\n\nPrerequisites\n-------------\n\nTo develop with Unity you will need to [Download and install Unity\nHub](https://unity.com/download).\n\nInstall [version 6000.0.23f1](https://unity.com/releases/editor/whats-new/6000.0.23) of the Unity Editor and\nAndroid Build Support, which includes:\n\n- OpenJDK\n- Android SDK\n- Android NDK Tools\n\nSelect a rendering engine\n-------------------------\n\nWe recommend using the Vulkan Graphics API to render Android XR apps. To select\nVulkan as your Graphics API, follow these steps:\n\n1. In Unity, go to **Edit** \\\u003e **Project Settings** \\\u003e **Player**.\n2. Select the **Android** tab and navigate to **Other Settings \\\u003e Rendering**.\n3. If **Auto Graphics API** is enabled, disable this setting to reveal the **Graphics APIs** section.\n4. In the **Graphics APIs** section, select the **Add (+)** button and select\n **Vulkan** from the dropdown.\n\n5. Re-order the Graphics APIs using the handles (=) so that Vulkan is listed\n first.\n\n6. Optionally, select any other Graphics APIs and click the **Remove** (-)\n button to remove them.\n\nUniversal Render Pipeline\n-------------------------\n\nAndroid XR is compatible with the Universal Render Pipeline (URP). If you plan\nto use passthrough, you should update the default URP settings for best\npassthrough performance on Android XR.\n| **Note:** For existing projects with assets made for Built-in Render Pipeline, you should use the [Render Pipeline Converter](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/features/rp-converter.html) to convert those assets to be compatible with URP.\n\nThe following table has a list of Unity's recommended URP settings, which are\nexplained in greater detail in the following sections.\n\n| Setting | Location | Recommended value |\n|-----------------|---------------------------------|-------------------|\n| HDR | Universal Render Pipeline Asset | Disabled |\n| Post-processing | Universal Renderer Data | Disabled |\n\n| **Note:** Vulkan is required if you're using URP. We recommend using Vulkan as your graphics API for Android XR, as newer graphics features are supported only with that API.\n\n### Universal Render Pipeline Asset settings\n\nFollow these steps to optimize your Universal Render Pipeline Asset for Android\nXR:\n\n1. Locate your project's **Universal Render Pipeline Asset** . One way to do this\n is to type `t:UniversalRenderPipelineAsset` into the **Project** window's\n search bar.\n\n | **Note:** If your project does not contain a Universal Render Pipeline Asset, refer to [Installing the Universal Render Pipeline into an existing\n | Project](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/InstallURPIntoAProject.html) from the URP docs.\n2. Under the **Quality** header, disable **HDR**.\n\n### Universal Renderer Data settings\n\nFollow these steps to optimize your Universal Renderer Data for Android XR:\n\n1. Locate your project's **Universal Renderer Data Asset** . One way to do this is\n to type `t:UniversalRendererData` into the **Project** window's search bar.\n\n2. In the **Inspector** , under the **Post-processing** header, uncheck\n **Enabled**.\n\nMinimal Android API level\n-------------------------\n\nSet your project to a minimal API level of 24, which is required by the OpenXR\nLoader. Otherwise, your builds may fail.\n\nComplete these steps to set the minimal Android API level.\n\n1. Go to **Edit** \\\u003e **Project Settings** \\\u003e **Player**.\n2. Select the Android tab and open **Other Settings**.\n3. In the **Identification** section, for **Minimal API level**, select 24 or higher.\n\nApplication entry point\n-----------------------\n\nConfigure the following settings for application entry point:\n\n1. Go to **Edit** \\\u003e **Project Settings** \\\u003e **Player**.\n2. Select the **Android** tab and open **Other Settings**.\n3. In the **Configuration** section, make sure **Application Entry Point** has **GameActivity** checked and **Activity** unchecked.\n\nPop-up windows\n--------------\n\nMost Android XR apps require resizable windows, as they are required to render\npop-ups such as system permission requests.\n\nFollow these steps to ensure pop-up windows are rendered properly.\n\n1. Go to **Edit** \\\u003e **Project Settings** \\\u003e **Player**.\n2. Select the **Android** tab and open **Resolution and Presentation**\n3. In the **Resolution** section, enable **Resizeable Activity**.\n\nSee also\n--------\n\n- [Unity Android XR: OpenXR](https://docs.unity3d.com/Packages/com.unity.xr.androidxr-openxr@latest)\n- [Import Android XR Extensions for Unity](/develop/xr/unity/xr-extensions-quickstart)\n\n*** ** * ** ***\n\nOpenXR™ and the OpenXR logo are trademarks owned\nby The Khronos Group Inc. and are registered as a trademark in China,\nthe European Union, Japan and the United Kingdom."]]