Easily display and interact with web content in 3D or 2D using the web browser plugin
trusted by hundreds of developers. See
the developer site for full documentation.
🌐 Load a webpage
from a URL or
HTML string📺 Watch videos and YouTube
<>
Create UIs with HTMLâš¡ï¸ Get started fast with the 3D
WebViewPrefab or2D
CanvasWebViewPrefab, which render to aTexture2D and
handle user interactions📱 Includes a
Native 2D Mode optimized formobile
âŒ¨ï¸ Type with the included
on-screen keyboard or nativekeyboard
• C# source code for a
unified API that works seamlesslyacross
Android,
iOS,
Windows,
macOS,
WebGL, and UWP / Hololens
• Comprehensive API for controlling the browser and listening to browser events
• Execute JavaScript
• Send messages from JavaScript to C# and vice versa
• View PDFs
• Also includes extra Android and iOS-specific APIs
• Supports transparent pages
• Powered by the Android System WebView andWKWebView
Examples
• 3D WebView's included demo scenes:
â—¦ SimpleWebViewDemo
â—¦ CanvasWebViewDemo
â—¦ AdvancedWebViewDemo
â—¦ CanvasWorldSpaceDemo
• Oculus example (Quest, Rift)
• XR Interaction Toolkit example
• AR Foundation example
• Cardboard example
System requirements
• Unity 2017.3 or above
• Supports both Mono and IL2CPP
• Android 5.0+ (armv7, arm64, x86) with OpenGL graphics
• iOS 10+, supports both Metal and OpenGL
Important notes and limitations
• This package only supports Android and iOS. To support other platforms, you can install additional 3D WebView packages(Windows and macOS, WebGL, UWP, or create a custom bundle).All of the 3D WebView packages work seamlesslytogether, so all you need to do is install them into the same project, and then 3D WebView automatically detects anduses the correct plugin at runtime and build time.
• 3D WebView's native Android and iOS plugins are provided as precompiled libraries, and the native source code for themis not provided.
• 3D WebView's native Android and iOS plugins can't run in the editor, so a mock webview implementation is used by defaultwhile running in the editor. However, you can actually load and render real web content in the editor by also installing3D WebView for Windows and macOS into the project.
• If you're targeting Oculus headsets, then the 3D WebView for Android with Gecko Engine package isrecommended instead. For a comparison of these two packages, see the comparison page.
• When not running in Native 2D Mode, the iOS pluginhas a limitation where some 3rd-party JS video widgets do notfunction as expected. For more details, please see this article.
• When not running in Native 2D Mode, the web renderingframe rate of the iOS plugin is relatively slow (<15 FPS) due to iOS limitations. The exception tothis is video, which is rendered at a high frame rate.
• When not running in Native 2D Mode, the iOS plugindoesn't support rendering WebGL content.
• When not running in Native 2D Mode, the iOS plugin's support for hover and drag interactions has limitations.
• This package supports Universal Render Pipeline (URP), but WebViewPrefab doesn't currently support the "SRP Batcher"option on Android. So, when using URP on Android, you must either disable SRP Batcher in URP settings or useCanvasWebViewPrefab instead of WebViewPrefab.
• The Android and iOS plugins embeds PDF.js from Mozilla, so you must display a copy of its included Apache 2.0 licensein yourAndroid and iOS apps' about page or credits.