Sample project for using WebView in Oculus quest VR in Unity
Support for both Oculus Integration and XR Interaction Toolkit.
- The input system for WebView has been significantly changed
TLabWebViewVRTouchEventManager.cs --> TLabWebViewVRTouchEventListener.cs
TLabWebViewXRInputManager.cs --> TLabWebViewXRInputListener.cs
- Now officially compatible with Unity 2021 ~ 2022.
- The policy has been changed to manage libraries in the repository as submodules.
- Commit
4a7a833
If you cloned the project before, please clone the repository again. - Use
git submodule update --init
to adjust the commit of the submodule to the version recommended by the project.
- Commit
- We have decided to discontinue the
TLabWebViewVRTouchEventListener / TLabWebViewXRInputListener
and makeWebViewInputListener
the UI module of TLabWebView from now on. This allows the input module to work independently of plug-ins such as Oculus, XRToolkit, etc. (2024/2/13)
- Oculus Quest 2
- Qualcomm Adreno650
- Unity: 2021.23f1
- Unity 2021.3.23f1
- Oculus Integration
- XR Interaction Toolkit
- TextMeshPro
- ProBuilder
- TLabVKeyborad
- TLabWebView
- TLabVRPlayerController
Clone the repository with the following command
git clone https://github.com/TLabAltoh/TLabWebViewVR.git
- Change platform to Android from Build Settings
- 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
- Color Space: Linear
- Graphics: OpenGLES3
- Minimux API Level: 29
- Target API Level: 30 (Unity 2021), 31 ~ 32 (Unity 2022)
- ProjectSettings/XRPlugin-Manegement AndroidSettings --> Plugin-Provider --> Oculus
- Open Assets/TLab/TLabWebViewVR/OculusIntegration/Scenes/TLabWebViewVR.unity
- Change any parameter of TLabWebView attached to TLabWebViewVR/TLabWebView/WebView from the hierarchy
- Url: URL to load during WebView initialization
- DlOption: Whether to download to the application folder or the downloads folder
- SubDir: In case of setting download to application folder, it is downloaded to
{Application folder}/{files}/{SubDir}
- Web (Width/Height): Web page resolution (default 1024 * 1024)
- Tex (Width/Height): Texture2D resolution used within Unity (default 512 * 512)
- Open Assets/TLab/TLabWebViewVR/XRToolkit/Scenes/TLabWebViewVR_XRToolkit.unity
- Change any parameter of TLabWebView attached to TLabWebViewVR_XRToolkit/TLabWebView/WebView from the hierarchy
- Url: URL to load during WebView initialization
- DlOption: Whether to download to the application folder or the downloads folder
- SubDir: In case of setting download to application folder, it is downloaded to
{Application folder}/{files}/{SubDir}
- Web (Width/Height): Web page resolution (default 1024 * 1024)
- Tex (Width/Height): Texture2D resolution used within Unity (default 512 * 512)