Android XR SDK がデベロッパー プレビューで利用可能になりました。Google では皆様からのご意見やご感想をお待ちしています。
サポートページからお問い合わせください。
Unity 用 Android XR Extensions のクイックスタート
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
各機能には、コードとシーンの設定を試すためのサンプルが含まれています。このクイックスタートでは、Android XR Extensions for Unity パッケージをインポートし、フェイス トラッキング サンプルを構成する手順について説明します。
前提条件
以下の手順を完了する前に、Unity プロジェクトのセットアップの手順を完了していることを確認してください。
パッケージをインポートする
Git URL から Unity Package Manager パッケージを読み込むには:
- [Window] で [Package Manager] を開きます。
- パッケージ マネージャー ツールバーで追加メニューを開きます。
- 荷物を追加するオプションで、[+](プラス)ボタンをクリックします。
プルダウン リストで [Install package from git URL] をクリックします。
![UI の [Install package from git URL] ボタンの例](https://developer.android.com/static/images/develop/xr/unity/xr-extensions-quickstart/add-menu.png?authuser=3&hl=ja)
次の URL を入力します。
https://github.com/android/android-xr-unity-package.git
[インストール] を選択します。
顔追跡サンプルを構成する
このサンプルを含むすべてのサンプルには、プロジェクトの構成と設定方法に関する手順が記載された README ファイルが含まれています。
サンプルをインポートして構成する手順は次のとおりです。
[Package Manager] > [In Project] > [Android XR Extensions for Unity] に移動します。

[サンプル] タブを選択します。[Face Tracking] サンプルを見つけて、[Import] をクリックします。
![[サンプル] タブの例](https://developer.android.com/static/images/develop/xr/unity/xr-extensions-quickstart/import-face-tracking-sample.png?authuser=3&hl=ja)
[編集] > [プロジェクト設定] > [XR プラグイン管理] に移動します。
[Android] タブの [プラグイン プロバイダ] で、[OpenXR] を有効にします。
次に、Android XR(拡張機能)機能グループを有効にします。

[Edit] > [Project Settings] > [XR Plug-in Management] > [OpenXR] に移動します。
[Android XR: フェイス トラッキング] を有効にします。

[XR Plug-in Management] > [Project Validation] で、OpenXR 関連の問題をすべて修正します。これにより、プレーヤーの設定を構成できます。

Project で、[Assets] > [Samples] > [Android XR Extensions for Unity] > version > [Face Tracking] にある [FaceTracking] シーンを開きます。

OpenXR™ と OpenXR のロゴは、Khronos Group Inc. が所有する商標であり、中国、欧州連合、日本、英国で商標として登録されています。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Android XR Extensions for Unity quickstart\n\nEach feature includes a sample for you to use and play with code and scene\nsetups. This quickstart walks you through importing the Android XR Extensions\nfor Unity package and then configuring the face tracking sample.\n\nPrerequisites\n-------------\n\nBefore completing these steps, make sure you've completed the steps described in\n[Unity project setup](/develop/xr/unity/setup).\n\nImport packages\n---------------\n\nTo load a Unity Package Manager package from a Git URL:\n\n1. In **Window** , open the **Package Manager**.\n2. Open the add menu in the **Package Manager** toolbar.\n3. In the options for adding packages, click the **+** (plus) button.\n4. In the drop-down list, click **Install package from git URL**.\n\n5. Enter the following URL:\n\n https://github.com/android/android-xr-unity-package.git\n\n6. Select **Install**.\n\nConfigure the face tracking sample\n----------------------------------\n\nAll samples, including this one, include a README file containing\ninstructions on how to configure and set up the project.\n\nTo import and configure the sample:\n\n1. Go to **Package Manager** \\\u003e **In Project** \\\u003e **Android XR Extensions for Unity**.\n\n2. Select the **Samples** tab. Find the **Face Tracking** sample and click **Import**.\n\n3. Go to **Edit \\\u003e Project Settings \\\u003e XR Plug-in Management**.\n\n4. In the **Android** tab, under **Plug-in Providers** , enable **OpenXR**.\n\n Then, enable the **Android XR (Extensions) feature group** .\n5. Go to **Edit \\\u003e Project Settings \\\u003e XR Plug-in Management \\\u003e OpenXR**.\n\n6. Enable **Android XR: Face Tracking**.\n\n7. Under **XR Plug-in Management \\\u003e Project Validation**, fix all OpenXR-related\n issues. This helps configure your Player Settings.\n\n8. In your **Project** , open the **FaceTracking** scene, located in **Assets \\\u003e Samples \\\u003e Android XR Extensions for Unity \\\u003e *version* \\\u003e Face Tracking**.\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."]]