All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams
Documentation · Quick Start · QQ Group: 467608841 / 233840761
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.
- Display web pages within Unity games
- Interact between C# and JavaScript
- Fullscreen support
- Android and iOS platform support
Edit your Unity project's Packages/manifest.json and add the scopedRegistries section:
{
"scopedRegistries": [
{
"name": "GameFrameX",
"url": "https://gameframex.upm.alianblank.uk",
"scopes": [
"com.gameframex"
]
}
]
}scopes controls which packages are resolved through this registry. Only packages whose names start with com.gameframex will be fetched from it.
Then add the package to dependencies:
{
"dependencies": {
"com.gameframex.unity.webview": "1.0.0"
}
}using GameFrameX.WebView.Runtime;
using UnityEngine;
public class Example : MonoBehaviour
{
void Start()
{
var webView = FindObjectOfType<WebViewComponent>();
webView.Show("https://gameframex.doc.alianblank.com");
}
}Show(string url)- Display a web view and load the specified URLHide()- Hide the web viewMakeFullScreen()- Set the web view to fullscreenExecuteJavaScript(string javaScript)- Execute JavaScript code
This repository is licensed under the MIT License.