Unity で開発された XR アプリケーションは、他のタイプのアプリケーションと同様にデバイス上で実行されます。ほとんどの場合は、Unity の Build and Run (ビルドして実行) 機能を使用して、接続されたデバイス上でアプリケーションのビルドと実行の両方を行うことができます。
ノート: ビルド済みのアプリケーションをデバイスにインストールする方法はプラットフォームによって異なるため、詳細に関してはプラットフォームのドキュメントを参照してください。
以下の手順で、ゲームやアプリケーションをビルドしてデバイス上で実行できます。
ヒント: ビルド設定が完了したら、File > Build And Run メニューコマンドで、直ちにプロジェクトをビルドして実行できます。
Unity プロジェクトのビルドに関する詳細は、ビルドの作成 を参照してください。
Windows プラットフォームでは、一部の XR プロバイダープラグインが “ハイブリッド” 再生モード (再生モードに入ると接続された XR デバイス上でプロジェクトが実行される) をサポートしています。Unity の ゲームビュー はヘッドセットディスプレイをミラーします。ゲームビューに関しては以下のオプションが利用可能です。
ヒント: Quest 2 または Pro 用に開発する場合は、Windows プラットフォームに切り替えて Quest Link を使用すれば、再生モードの (プロジェクトをビルドしてデバイスにアップロードするのと比べて) 高速なイテレーションを利用することが可能です。
Mock HMD パッケージは、再生モードで、Unity の ゲームビュー にヘッドマウントディスプレイ (HMD) のシミュレーションを提供します。Mock HMD は、ヘッドマウントデバイスの臨場感をシミュレートするプロバイダープラグインです。XR Plug-in Management 設定セクションで Mock HMD を有効にしてください。入力とトラッキングはシミュレートされません。
詳細は Mock HMD に関するドキュメント を参照してください。
ヒント: XR Interaction Toolkit パッケージは、キーボードとマウスの入力を動きとインタラクションに変換する XR Device Simulator を提供します。
AR Foundation パッケージは、エディターで AR アプリケーションをテストするために使用できる、XR Simulation 機能を提供します。XR Simulation は、再生モードで使用可能な、ビルド前のテスト用の環境を提供します。このシミュレーションは、あたかも実世界の環境内をナビゲートしたかのように、検出された AR 要素 (例えば平面など) をレポートします。与えられた環境に変更を加えて、独自の環境を作成することもできます。
詳細は、XR Simulation を参照してください。
ほとんどの XR デバイスは、既存の OS プラットフォームの 1 つを使用します。各種プラットフォームでのプロジェクトの実行に関する詳細は、以下を参照してください:
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.