手順
- 3Dでプロジェクトを作る
- Edit → Project Setting → XR Plugin Management → install
- PCとAndroidのOculusにチェック
- Oculus Integrationをインストール → UnityAppを開く
- Oculus Integrationをimport → 全ての項目にYes
- Oculus → Tool → Project Setup Tool → PCとAndroidをAll fix & All Apply
- File → Build Settings → AndroidにSwitch Platform
カメラの設定
- MainCameraをDelete
- Assetの検索 → OVRCameraRigの2個目をHierarchyにドロップ
コントローラー
- Assetの検索 → OVRControllerPrefab をOVRCameraRigの子要素Left,RightどちらとものHandAnchor内のControllerAnchorにドロップ
- OVRControllerPrefab内のControllerをそれぞれL Touch, R Touchに
- Assetの検索 → OVRHandPrefab をOVRCameraRigの子要素Left,RightどちらとものHandAnchorにドロップ
- RightのOVRHandPrefabのHandType,SkeletonType,MeshTypeをHandLeftからHandRightに
パススルー
- Hierarchy → Create Empty → Add Component → OVRPassthroughLayer
- OVRCameraRigの子要素CenterEyeAnchorのClearFlagsをSkyBoxからSolidColorにし,BackGroundを真っ黒に
- OVRCameraRigのOVRManagerのTarget DevicesのQuest3にチェック
- 同じくOVRManagerのHandTrackingSupportをControllersOnlyからControllers And Handsに
- 同じくOVRManagerのPassthroughSupportをNoneからSupportedにし,EnablePasstjroughにチェック
起動
- SceneInBuildにSampleSceneを追加する
- BuildSettingからDevicesをOculusにして,Build&Run