An open API service indexing awesome lists of open source software.

https://github.com/tlabaltoh/tlabwebviewvr

Sample Unity project for using TLabWebView in OculusQuest. Includes Meta XR SDK and XR Interaction Toolkit implementation example.
https://github.com/tlabaltoh/tlabwebviewvr

android oculus-quest unity unity3d vr webview

Last synced: 14 days ago
JSON representation

Sample Unity project for using TLabWebView in OculusQuest. Includes Meta XR SDK and XR Interaction Toolkit implementation example.

Awesome Lists containing this project

README

        

# TLabWebViewVR

[```TLabWebView```](https://github.com/TLabAltoh/TLabWebView) (3D ウェブブラウザ / 3D WebView プラグイン) を OculusQuest で使用するためのサンプルUnityプロジェクト.[```Meta XR SDK```](https://developers.meta.com/horizon/downloads/package/meta-xr-sdk-all-in-one-upm) と [```XR Interaction Toolkit```](https://docs.unity3d.com/Packages/[email protected]/manual/index.html) それぞれで実装したサンプルが内包されています.

[ドキュメントはこちら](https://tlabgames.gitbook.io/tlabwebview)
[スニペットはこちら](https://gist.github.com/TLabAltoh/e0512b3367c25d3e1ec28ddbe95da497#file-tlabwebview-snippets-md)

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/tlabaltoh)

> [!WARNING]
> このプロジェクトはAndroidデバイス上でのみ動作します.Unity Editor上で実行してもWebページは表示されないことに注意してください.

> [!WARNING]
> Meta XR All-in-One SDK がバージョン74から参照エラーを起こしているようなので,今のところはバージョン72をキープしています (これについて言及されている[フォーラム](https://www.reddit.com/r/oculusdev/comments/1jn4l5k/error_implementing_meta_allinone_sdk/)).

> [!WARNING]
> このプロジェクトをOculus Questへデプロイする場合,Unity 6000.xでこのプロジェクトをビルドすることを私はお勧めしません.今現在,このプロジェクトをUnity 6000.xでビルドした場合,`HardwareBuffer`モードが動作が不安定になる問題が見つかっています([詳細はこちらのissueを参照してください](https://github.com/TLabAltoh/TLabWebViewVR/issues/39)).もしする場合は,[セットアップセクション]([[Setup section]()](https://github.com/TLabAltoh/TLabWebViewVR?tab=readme-ov-file#set-up))の"Unity 6000.x向けの設定"という項目を参考にしてください.

> [!WARNING]
> このプロジェクトは,WebViewの`CaptureMode`にデフォルトで`HardwareBuffer`を使用しています.また,`Graphics API`には`Vulkan`をデフォルトで使用しています.この`HardwareBuffer`オプションと`Vulkan` APIの組み合わせは,Oculus Questでは動作を確認していますが,他の一部のデバイスでは動かない可能性があります (例えばWebViewの画面が真っ白になってしまう等).その場合,プロジェクトの`Graphics API`をデフォルトで設定されている`Vulkan`から`OpenGLES`へ変更する,もしくは,`CaptureMode`を`HardwareBuffer`から`ByteBuffer`に変更してください.
>
>
>

>
>

## スクリーンショット

[Watch on Youtube](https://youtu.be/q3swlSP1mRg)
![output](Media/tlab-webview-vr.gif)

## 動作環境
| | |
| ------- | ------------------- |
| Headset | Oculus Quest 2 |
| GPU | Qualcomm Adreno 650 |
| Unity | 2021.37f1 |

## スタートガイド
### 必要なもの
- Unity 2021.3.26f1 (```meta-xr-sdk``` が Unity Editor 2021.26f1以降を必要とします)
- [meta-xr-all-in-one-sdk](https://assetstore.unity.com/packages/tools/integration/meta-xr-all-in-one-sdk-269657?locale=ja-JP)
- [com.unity.xr.interaction.toolkit](https://docs.unity3d.com/Packages/[email protected]/manual/index.html)
- [TLabVKeyborad](https://github.com/TLabAltoh/TLabVKeyborad)
- [TLabWebView](https://github.com/TLabAltoh/TLabWebView)

### インストール
- 任意のディレクトリに以下のコマンドでリポジトリをクローン
```
git clone https://github.com/TLabAltoh/TLabWebViewVR.git

cd TLabWebViewVR

git submodule update --init
```

### セットアップ
[こちら](https://github.com/TLabAltoh/TLabWebView/blob/master/README-ja.md#%E3%82%BB%E3%83%83%E3%83%88%E3%82%A2%E3%83%83%E3%83%97)のセットアップセクションを参照してください

OpenXRを使用する場合

XR Plugin Manegementから`Force Remove Internet Permission`を無効にしてください.

Unity 6000.x向けの設定

このプロジェクトをUnity 6000.xで開くと,TMProのリソースでコンパイルエラーが発生します.これを解消するために,TMProのリソースを再度インポートしてください.

また,`CaptureMode`を,デフォルトの`HardwareBuffer`から`ByteBuffer`に変更してください.


### サンプルシーン

#### Meta XR SDK
```Assets/TLab/TLabWebViewVR/MetaXR/Samples/Scenes/MetaXR Sample.unity```

#### XR Interaction Toolkit
```Assets/TLab/TLabWebViewVR/XRInteractionToolkit/Samples/Scenes/XRInteractionToolkit Sample.unity```

## サンプルリポジトリ for Unity 2022
- [Oculus Integration Sample](https://github.com/TLabAltoh/TLabWebViewVR-OculusIntegration-2022)
- [XR Interaction Toolkit Sample (VR Template)](https://github.com/TLabAltoh/TLabWebViewVR-XRInteractionToolkit-2022)