TLabAltoh / TLabWebViewVR

Sample project for using WebView in Oculus quest VR in Unity. Includes Meta XR SDK and XR Interaction Toolkit implementation example.
https://tlabgames.gitbook.io/tlabwebview/
MIT License
38 stars 5 forks source link
android oculus-quest unity unity3d vr webview

TLabWebViewVR

日本語版READMEはこちら

Sample project for using WebView in Oculus quest VR in Unity. Includes Meta XR SDK and XR Interaction Toolkit implementation example.

"Buy Me A Coffee"

Document

Document is here

Screenshot

Watch on Youtube
output

Operating Environment

Headset Oculus Quest 2
GPU Qualcomm Adreno 650
Unity 2021.37f1

Getting Started

Prerequisites

Installing

cd TLabWebViewVR

git submodule update --init


### Set Up
- Build Settings

| Property      | Value   |
| ------------- | ------- |
| Platform      | Android |

- Project Settings

| Property          | Value                                 |
| ----------------- | ------------------------------------- |
| Color Space       | Linear                                |
| Minimum API Level | 29                                    |
| Target API Level  | 30 (Unity 2021), 31 ~ 32 (Unity 2022) |

- Add the following symbols to Project Settings --> Player --> Other Settings (to be used at build time)  

UNITYWEBVIEW_ANDROID_USES_CLEARTEXT_TRAFFIC

UNITYWEBVIEW_ANDROID_ENABLE_CAMERA

UNITYWEBVIEW_ANDROID_ENABLE_MICROPHONE


- XR Plug-in Management

| Property        | Value               |
| --------------- | ------------------- |
| Plugin Provider | Oculus (not OpenXR) |

- If you want to access files that are in external storage (like download, picture). you need to add follow manifest in Android 11 ([detail](https://developer.android.com/training/data-storage/manage-all-files?hl=en)).

```.xml
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

Sample Scene

Meta XR SDK

Assets/TLab/TLabWebViewVR/MetaXR/Samples/Scenes/MetaXR Sample.unity

XR Interaction Toolkit

Assets/TLab/TLabWebViewVR/XRInteractionToolkit/Samples/Scenes/XRInteractionToolkit Sample.unity

Sample Repository for Unity 2022

Link

Source code of the java plugin used