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
- Now officially compatible with Unity 2021 ~ 2022.
- We have decided to discontinue the
TLabWebViewTouchEventManagerand makeWebViewInputListenerthe UI module of TLabWebView from now on. This allows the input module to work independently of plug-ins such as Oculus, XRToolkit, etc.
Screenshot run on Android 13, Adreno 619
OS: Android 10 ~ 13
GPU: Qualcomm Adreno 505, 619
Unity: 2021.23f1
- Unity 2021.3.23f1
- TLabVKeyborad
Clone the repository or download it from the release and place it in the Asset folder of Unity
- 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: 26
- Target API Level: 30 (Unity 2021), 31 ~ 32 (Unity 2022)
- Add TLabWebView/TLabWebView.prefab to scene
- 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)
- public void Init(int webWidth, int webHeight, int tWidth, int tHeight, int sWidth, int sHeight, string url, int dlOption, string subDir)
- public bool IsInitialized()
- public void StartWebView()
- public byte[] GetWebTexturePixel() (obsolete)
- public IntPtr GetTexturePtr()
- public void UpdateFrame()
- public void CaptureHTMLSource()
- public void CaptureElementById(string id)
- public string CurrentHTMLCaptured()
- public void LoadUrl(string url)
- public void LoadHTML(string html, string baseURL)
- public void GoForward()
- public void GoBack()
- public void ZoomIn()
- public void ZoomOut()
- public void CaptureUserAgent()
- public string GetUserAgent()
- public void SetUserAgent(string ua, bool reload)
- public void EvaluateJS(string js)
- public void TouchEvent(int x, int y, int eventNum)
- public void KeyEvent(char key)
- public void BackSpace()
- public void ClearCache(bool includeDiskFiles)
- public void ClearCookie()
- public void ClearHistory()
- Now supports play in VR (link).


