Skip to content

Plug-in for WebView that runs in Unity and can display WebView results as Texture2D

License

Notifications You must be signed in to change notification settings

HafizMSaad/TLabWebView

 
 

Repository files navigation

TLabWebView

日本語版READMEはこちら

Plug-in for WebView that runs in Unity and can display WebView results as Texture2D

  • Hardware-accelerated rendering is also available
  • Key input support
  • File Download Support
  • Supports javascript execution

"Buy Me A Coffee"

Document

document is here

Note

  • Now officially compatible with Unity 2021 ~ 2022.
  • We have decided to discontinue the TLabWebViewTouchEventManager and make WebViewInputListener the UI module of TLabWebView from now on. This allows the input module to work independently of plug-ins such as Oculus, XRToolkit, etc.

Screenshot

Screenshot run on Android 13, Adreno 619

Operating Environment

OS: Android 10 ~ 13
GPU: Qualcomm Adreno 505, 619
Unity: 2021.23f1

Getting Started

Prerequisites

Installing

Clone the repository or download it from the release and place it in the Asset folder of Unity

Set up

  1. Change platform to Android from Build Settings
  2. 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
  • Minimum API Level: 26
  • Target API Level: 30 (Unity 2021), 31 ~ 32 (Unity 2022)
  1. Add TLabWebView/TLabWebView.prefab to scene
  2. Change the setting of WebView Setting items in TLabWebView.cs (located in TLabWebView.prefab/WebView)

  • 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)

NOTICE

  • Now supports play in VR (link).

Link

Source code of the java plugin used

About

Plug-in for WebView that runs in Unity and can display WebView results as Texture2D

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%