TLabWebView
日本語版READMEはこちら
Plug-in for WebView that runs in Unity and can display WebView results as Texture2D
- Hardware-accelerated rendering is available
- Key input support
- File Download Support (blob url, data url, download manager ...)
- Supports javascript execution
- Resize webview and texture
!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)
Document
document is here
Unity version this plugin supports
- [x] Unity 2021
- [x] Unity 2022
Graphics api this plugin supports
- [x] OpenGLES
- [x] Vulkan (with some limitations)
Screenshot
Screenshot run on Android 13, Adreno 619
Operating Environment
|
|
OS |
Android 10 ~ 14 |
GPU |
Qualcomm Adreno 505, 619 |
Unity |
2021.3 |
Getting Started
Requirements
Installing
Please see here
#### Submodule
Clone this repository with the following command
```
git clone https://github.com/TLabAltoh/TLabWebView.git
```
or
```
git submodule add https://github.com/TLabAltoh/TLabWebView.git
```
#### UPM
```add package from git URL ...```
```
https://github.com/TLabAltoh/TLabWebView.git#upm
```
Set Up
Please see here
- Build Settings
| Property | Value |
| ------------- | ------- |
| Platform | Android |
- Project Settings
| Property | Value |
| ----------------- | ------------------------------------- |
| Color Space | Linear |
| Minimum API Level | 26 |
| 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
```
Prefab
Prefab is here. Just add prefab to the canvas to implement webview
/Resources/TLabWebView.prefab
NOTICE
-
If you want to access files that are in external storage (like download, picture). you need to add follow manifest in Android 11 (detail).
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
-
This plugin supports both Vulkan and OpenGLES, but if you are building an application that uses a Vulkan graphics API, the Android device must support OpenGLES as well as Vulkan. This is because some processes in this plugin depend on the GLES API.
-
Now supports play in VR (link).
TODO
- Remove the GLES API dependency from the Vulkan use case.
Link
Source code of the java plugin used