Skip to content

GameFrameX/com.gameframex.unity.webview

Repository files navigation

GameFrameX Logo

Game Frame X Web View

License Version

All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams

Documentation | Quick Start | QQ Group

English | 简体中文 | 繁體中文 | 日本語 | 한국어

Project Overview

Game Frame X Web View is a Web View component for the Game Frame X game framework. It allows you to embed and display web content within Unity games.

This component wraps gree/unity-webview, providing a simpler API and easier integration.

Features

  • Display web pages within Unity games
  • Interact between C# and JavaScript
  • Fullscreen support
  • Android and iOS platform support

Installation

  1. Open Package Manager in Unity Editor
  2. Click + and select Add package from git URL...
  3. Enter https://github.com/gameframex/com.gameframex.unity.webview.git
  4. Click Add

Usage

using GameFrameX.WebView.Runtime;
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        var webView = FindObjectOfType<WebViewComponent>();
        webView.Show("https://gameframex.doc.alianblank.com");
    }
}

API

  • Show(string url) - Display a web view and load the specified URL
  • Hide() - Hide the web view
  • MakeFullScreen() - Set the web view to fullscreen
  • ExecuteJavaScript(string javaScript) - Execute JavaScript code

License

This repository is licensed under the MIT License.

About

GameFrameX Unity WebView component for embedding web pages and browser functionality within Unity applications

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages