Version: 2022.1
言語: 日本語
XR support packages
XR プロジェクトの設定

XR アーキテクチャ

Unity supports XR development through its plug-in framework and a set of feature and tool packages. Use the XR Plug-in Management settings page to enable XR support in a Unity project and to choose the plug-ins for the XR devices your project supports. Use the Package Manager to install the additional feature packages.

下の図は、現在の Unity XR プラグインフレームワークの構造と、それがどのようにプラットフォームプロバイダーの実装と連携機能するかを示したものです。

Unity XR プラグインフレームワーク構造

Plug-ins for an XR platform implement the subsystem interfaces defined in the Unity XR SDK. The Unity Engine and XR packages use the subsystem interfaces to provide features to XR apps.

XR プロバイダープラグインフレームワーク

An XR provider plug-in is a Unity plug-in that supports an XR device platform. For example, the ARCore plugin supports the Android AR platform on hand-held Android devices, while the Oculus plug-in supports Oculus devices on both Windows and Android.

An XR provider plug-in implements interfaces defined by the Unity XR SDK. These interfaces are called Subsystems in Unity XR. A plug-in that implements one or more subsytems is called a Provider plug-in. Typically, a provider plug-in uses the device maker’s own native libraries to implement the Unity interfaces for their devices. The provider plug-in registers the subsystems it provides so that the Unity XR code knows which features are available when it loads the plug-in.

Unity code in the engine and packages use the subsystem interfaces to communicate with the active providers and to provide XR features to your application. Because of this common interface, you can generally reuse the same code across many XR devices. (Of course, if a provider or device doesn’t support a particular feature, then that feature cannot work when using that provider or on those devices lacking the required hardware or software support.)

サブシステム

XR subsystems provide XR features to your Unity application. The Unity XR SDK defines a common interface for subsystems so that all provider plug-ins implementing a feature generally work the same way in your app. Often you can change the active provider and rebuild your app to run on a different XR platform, as long as the platforms are largely similar.

The Unity Engine defines a set of fundamental XR subsystems. Unity packages provide additional subsytems. For example, the AR Subsystems package contains many of the AR-specific subsytem interfaces.

Unity エンジン内で定義されるサブシステムには、以下が含まれます。

サブシステム 説明
Display ステレオ XR ディスプレイ
Input 空間トラッキングとコントローラー入力
Meshing 環境スキャンから 3D メッシュを生成します。

Note: Unity applications typically do not interact with subsytems directly. Instead, the features provided by a subsytem are exposed to the application through an XR plug-in or package. For example, the ARMeshManager component in the AR Foundation package lets you add the meshes created by the Meshing subsystem to a scene.

XR support packages
XR プロジェクトの設定