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
Choose one of the following methods:
-
Edit your Unity project's
Packages/manifest.jsonand add thescopedRegistriessection:{ "scopedRegistries": [ { "name": "GameFrameX", "url": "https://gameframex.upm.alianblank.uk", "scopes": [ "com.gameframex" ] } ], "dependencies": { "com.gameframex.unity.webview": "1.0.0" } }scopescontrols which packages are resolved through this registry. Only packages whose names start withcom.gameframexwill be fetched from it. -
Add to
manifest.jsondependencies:{ "com.gameframex.unity.webview": "https://github.com/gameframex/com.gameframex.unity.webview.git" } -
Use Package Manager in Unity with Git URL:
https://github.com/gameframex/com.gameframex.unity.webview.git -
Clone the repository into your Unity project's
Packagesdirectory. It will be loaded automatically.
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
| Package | Description |
|---|---|
com.gameframex.unity |
1.0.0 |
- QQ Group: 467608841 / 233840761
See Releases for changelog.
This repository is licensed under the MIT License.