Gamebase SDK for Unity 2.68.1
Toast Gamebase Platform
Loading...
Searching...
No Matches

◆ ShowWebView()

static void ShowWebView ( string url,
GamebaseRequest::Webview::GamebaseWebViewConfiguration configuration = null,
GamebaseCallback::ErrorDelegate closeCallback = null,
List< string > schemeList = null,
GamebaseCallback::GamebaseDelegate< string > schemeEvent = null )
static

This method to create the webview and display it on screen.

Since
Added 1.5.0.
Parameters
urlThe url of the resource to load.
configurationThe configuration of webview.
closeCallbackThis callback would be called when webview is closed
schemeListThis schemeList would be filtered every web view request and call schemeEvent
schemeEventThis schemeEvent would be called when web view request matches one of the schemeLlist

Example Usage :

public void ShowWebViewSample(GamebaseCallback.ErrorDelegate closeCallback, List<string> schemeList, GamebaseCallback.GamebaseDelegate<string> schemeEvent)
{
var configuration = new GamebaseRequest.Webview.GamebaseWebViewConfiguration
{
title = "Title",
orientation = GamebaseScreenOrientation.UNSPECIFIED,
colorR = 128,
colorG = 128,
colorB = 128,
colorA = 255,
barHeight = 40,
isBackButtonVisible = true
};
Gamebase.Webview.ShowWebView("http://www.naver.com", configuration, closeCallback, schemeList, schemeEvent);
}
static void ShowWebView(string url, GamebaseRequest.Webview.GamebaseWebViewConfiguration configuration=null, GamebaseCallback.ErrorDelegate closeCallback=null, List< string > schemeList=null, GamebaseCallback.GamebaseDelegate< string > schemeEvent=null)
This method to create the webview and display it on screen.
Definition Gamebase.cs:2842
The WebView class represents the entry point for launching WebView.
Definition Gamebase.cs:2792
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11