Gita Assets
Unity / Tools

Unity 2D WebView for WebGL Web Browser IFrame 4.1

Overview

2D WebView for WebGL is a web browser plugin for displaying and interacting with web content in 2D in Unity WebGL projects. It is powered by the HTML iframe element and provides a C# source code API that works across Windows, macOS, Android, iOS, visionOS, WebGL, and UWP, with each platform sold separately; this package itself only supports WebGL.

Key features

Load a webpage from a URL or HTML string
Watch videos and YouTube embeds
Create UIs with HTML
Get started fast with the 2D CanvasWebViewPrefab
C# source code for a unified API that works seamlessly across Windows, macOS, Android, iOS, visionOS, WebGL, and UWP (each platform sold separately)
Powered by the HTML iframe element
Comprehensive APIs for controlling the browser and listening to browser events
Execute JavaScript
Send messages from JavaScript to C# and vice versa
View PDFs
Integrate with OAuth
Includes additional APIs for platform-specific features
Supports transparent pages
Adds less than 50 KB to the app's size

Included content

2D CanvasWebViewPrefab
Examples:
2D WebView's included CanvasWebViewDemo scene
WebGL WebView Demo

Compatibility

The version supplied by this store is 5.0; actual support is based on that version.
Unity 2022.3.62f1: Built-in supported; URP supported; HDRP supported.
The unified API works across Windows, macOS, Android, iOS, visionOS, WebGL, and UWP, with each platform sold separately; this package only supports WebGL.

Requirements

Unity 2019.4 or newer
WebGL Build Support

Render pipeline compatibility

UnityBuilt-inURPHDRP
2022.3.62f1

Technical specifications

Original creator
Vuplex
Current official version
5.0
Supported engines
2022.3.62, 2022.3.62f1
Render pipelines
2022.3.62f1 · Built-in / HDRP / URP
Official file size
0.76 MB
Official update date
2026-11-12
Asset file count
145
Package format
unitypackage
First official release
2021-09-21

Tags

Full description

Easily display and interact with web content in 2D using a web browser plugin. Due to browser limitations, this package has significant limitations compared to the other 3D WebView packages. Load a webpage from a URL or HTML string Watch videos and YouTube embeds Create UIs with HTML Get started fast with the 2D CanvasWebViewPrefab • C# source code for a unified API that works seamlessly across Windows, macOS, Android, iOS, visionOS, WebGL, and UWP (each platform sold separately) • Powered by the HTML element • Comprehensive APIs for controlling the browser and listening to browser events • Execute JavaScript • Send messages from JavaScript to C# and vice versa • View PDFs • Integrate with OAuth • Includes additional APIs for platform-specific features • Supports transparent pages Examples • 2D WebView's included CanvasWebViewDemo scene • WebGL WebView Demo System requirements • Unity 2019.4 or newer • WebGL Build Support • Adds less than 50 KB to the app's size Important notes and limitations • This package only supports WebGL. To support other platforms, you can install additional 3D WebView packages. All of the 3D WebView packages work seamlessly together, so all you need to do is install them into the same project, and then 3D WebView automatically detects and uses the correct plugin at runtime and build time. • 3D WebView's native WebGL plugins are provided as precompiled libraries, and the native source code for them is not provided. • 3D WebView's WebGL plugins can't run in the editor, so a mock webview implementation is used by default while running in the editor. However, you can actually load and render real web content in the editor by also installing 3D WebView for Windows and macOS into the project. • This package only supports Native 2D Mode. This means that it only supports 2D screen space (it doesn't support 3D world space), and it's not possible to render web content to a texture, render other Unity objects or UI elements in front of a webview, or rotate a webview. • This package is unable to load websites that block iframes by sending an X-Frame-Options header. For example, many popular sites like Google and Facebook block iframes using X-Frame-Options. • When the webview's URL has a different domain than the Unity app, most of the IWebView methods become disabled. HTML loaded with LoadHtml() also faces this limitation, but an alternative that supports the IWebView methods is to load the HTML from StreamingAssets instead. • When the Unity app is served over HTTPS, webviews cannot load insecure HTTP URLs (i.e. HTTPS must be used instead of HTTP). • Unity's "Minimal" WebGL template is not supported. • The following IWebView methods are not supported and are ignored at runtime: ◦ CaptureScreenshot() ◦ Copy(), Cut(), and Paste() ◦ GetRawTextureData() ◦ PageLoadFailed ◦ ZoomIn() and ZoomOut() ◦ Additional APIs unsupported in Native 2D Mode • The following IWebView methods have limitations: ◦ LoadUrl(url, additionalHeaders) is unable to send additional headers due to browser limitations, so it loads the URL without additional headers. ◦ CanGoBack() and CanGoForward() both return whether the webview can either go back or forward. In other words, both methods return true if the webview can go either back or foward, and both return false if the webview can't go back or forward. ◦ LoadProgressChanged only indicates the ProgressChangeType.Started and Finished events and is unable to indicate the Failed or Updated events.

Ratings and reviews

You can rate and review this item after purchase.

No buyer reviews yet.

Unity 2D WebView for WebGL Web Browser IFrame 4.1 · Unity Tools · Preview 3Unity 2D WebView for WebGL Web Browser IFrame 4.1 · Unity Tools · Preview 4Unity 2D WebView for WebGL Web Browser IFrame 4.1 · Unity Tools · Preview 5Unity 2D WebView for WebGL Web Browser IFrame 4.1 · Unity Tools · Preview 6Unity 2D WebView for WebGL Web Browser IFrame 4.1 · Unity Tools · Preview 7
Contact support