There are two different versions of 3D WebView for Android, which use different browser engines:
- 3D WebView for Android uses Android's built-in System WebView as its browser engine.
- 3D WebView for Android with Gecko Engine embeds Mozilla's Gecko Browser Engine, which provides better stability and provides better support for mouse interactions on VR headsets.
The original 3D WebView for Android package is recommended for normal Android development because its native library size is smaller and because it supports Native 2D Mode. However, if you're developing for a VR headset like Oculus Quest, then 3D WebView for Android with Gecko Engine is recommended instead. Or if you prefer, you can use both versions together in order to get the best of both worlds. A more detailed comparison of the two versions is provided below.
3D WebView for Android
- Has a small storage footprint (< 2 MB), because the browser engine is built into the operating system instead of the library.
- Supports Native 2D Mode.
- Supports the native on-screen keyboard.
- Supports transparent webviews.
- On devices with the Google Play Store, the System WebView is automatically kept up-to-date with the latest version of Chromium.
Since the System WebView package is part of the operating system, it can vary from device to device:
- On devices without the Google Play Store, the System WebView may be permanently fixed to an old and potentially buggy version of Chromium, which can impact 3D WebView's functionality.
- Some device vendors modify the System WebView, which can introduce bugs that impact 3D WebView's functionality.
Although it's generally a good thing that the System WebView is automatically updated to the latest version of Chromium, it can present problems if the latest version of Chromium introduces bugs. For example, Chromium v91 introduced a bug which temporarily broke the System WebView's SetInitialScale() API. This bug was fixed in Chromium v92, but it temporarily impacted 3D WebView's functionality.
Note: 3D WebView for Android used to be incapable of playing native video and WebGL on VR headsets, but that limitation has been fixed in v3.14.
3D WebView for Android with Gecko Engine
- Mouse events and hovering work well, even on Oculus Quest.
- Since the Gecko browser engine is embedded as part of the 3D WebView library:
- It's less prone to issues due to variations in Android devices.
- It's not prone to issues due to the browser engine automatically being updated.
- Has a larger storage footprint because the browser engine is embedded in the library instead of the operating system. The GeckoView library adds ~50 MB to the size of the app's APK and ~164 MB to the size of the Unity project.
- Doesn't support Native 2D Mode.
- Doesn't support the native on-screen keyboard.
- Doesn't support transparent webviews.