npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

com.gmonks.webview

v1.1.0

Published

A WebView library for Unity Android platform, providing a simple way to display web content within Unity applications.

Readme

WebView for Unity

A Unity package for embedding web content in your Unity projects.

Features

  • Display web pages inside Unity
  • JavaScript and C# communication
  • Supports Android Platform only

Installation

Option 1: Using Unity Package Manager with Scoped Registry

  1. Open your Unity project.
  2. Go to Edit > Project Settings > Package Manager > Scoped Registries.
  3. Click + to add a new scoped registry and enter:
    • Name: GMonks
    • URL: https://registry.npmjs.org
    • Scope(s): com.gmonks
  4. Click Save.
  5. After adding the scoped registry, the package should appear in the Package Manager under the registry's name.
  6. Locate com.gmonks.webview in the list, select it, and choose the desired version to install.
  7. Click Install.

Option 2: Modify manifest.json Directly

  1. Open your project folder and navigate to Packages/manifest.json.

  2. Add or update the scopedRegistries section:

    "scopedRegistries": [
      {
        "name": "GMonks",
        "url": "https://registry.npmjs.org",
        "scopes": [
          "com.gmonks"
        ]
      }
    ],
  3. Add the package to the dependencies section:

    "com.gmonks.webview": "x.y.z"

    Replace x.y.z with the specific version you want to install, as listed in the package registry or release notes.

  4. Save the file and return to Unity. The package will be installed automatically.

Usage

Here's a basic example of how to use the WebView package in your Unity project:

  1. Create a WebView instance in your script.
    The WebView is used as a class object and does not require a prefab. You can instantiate and control it directly from your code, as shown below.

  2. Create a script to control the WebView.
    For example, you can use the following pattern:

    using GMonks.WebViewLib;
    public class WebViewDemo : MonoBehaviour, IWebViewEventListener
    {
         [SerializeField] private Button loadWebViewBtn;
         [SerializeField] private string webUrl = "https://google.com/";
    
         private WebView webView;
    
         private void Awake()
         {
              webView = new();
              loadWebViewBtn.onClick.AddListener(() =>
              {
                    webView.OpenURL(webUrl, GetOptions());
              });
         }
    
         private void OnEnable() => webView.EventHandler.AddListener(this);
         private void OnDisable() => webView.EventHandler.RemoveListener(this);
         private void OnDestroy() => webView.CloseWebView();
    
         // Implement IWebViewEventListener methods as needed
         public void OnWebViewFinishedLoading(string url) { /* ... */ }
         public void OnWebViewClosed() { /* ... */ }
         // See full example for more event handlers
    
         private DisplayOptions GetOptions()
         {
              return new DisplayOptions()
              {
                    insets = new EdgeInsets(0, 0, 0, 0),
                    setLoadWithOverviewMode = true,
                    shouldUseWideViewPort = true,
                    hidesTopBar = true,
                    browserBackgroundColor = "#FFFFFF",
                    hidesHistoryButtons = true,
                    backButtonCustomBehaviour = true,
                    webContentsDebuggingEnabled = true,
                    pinchAndZoomEnabled = false,
              };
         }
    }
  3. Implement the IWebViewEventListener interface to handle events such as loading, errors, closing, and JavaScript callbacks.

  4. Configure the WebView options using the DisplayOptions class to customize appearance and behavior.

  5. Use Unity UI elements (like a Button) to trigger WebView actions.

Support

This package is maintained by GMonks Entertainment Private Limited.
For support, please contact the package maintainer directly.


© 2014-2025 GMonks Entertainment Pvt. Ltd. All Rights Reserved.