void myShowCreatedWebView(AwesomiumUnityWebView _Caller, AwesomiumUnityWebView _NewView, string _OpenerURL, string _TargetURL, bool _IsPopUp) { Debug.Log("Created new web view from '" + _OpenerURL + "' to target '" + _TargetURL + "' (is popup: " + _IsPopUp + ")."); if (m_Prefab != null) { GameObject go = GameObject.Instantiate(m_Prefab) as GameObject; AwesomiumUnityWebTexture webtexture = go.GetComponent <AwesomiumUnityWebTexture> (); webtexture.m_Width = 1280; webtexture.m_Height = 720; webtexture.WebView = _NewView; webtexture.Initialize(); } }
// Use this for initialization void Start() { // Obtain the web texture component. m_WebTexture = GetComponent<AwesomiumUnityWebTexture>(); // Check to make sure we have an instance. if (m_WebTexture == null) { DestroyImmediate(this); } // Bind some C# functions to javascript functions. m_WebTexture.WebView.BindJavaScriptCallback("PlayGame", this.Callback_PlayGame); // Can be called from the HTML page by using: Unity.PlayGame(); m_WebTexture.WebView.BindJavaScriptCallback("GoToOptions", this.Callback_GoToOptions); // Unity.GoToOptions(); m_WebTexture.WebView.BindJavaScriptCallback("QuitGame", this.Callback_QuitGame); // Unity.QuitGame(); m_WebTexture.LoadURL(m_URL); }
// Use this for initialization void Start() { // Obtain the web texture component. m_WebTexture = GetComponent <AwesomiumUnityWebTexture>(); // Check to make sure we have an instance. if (m_WebTexture == null) { DestroyImmediate(this); } // Bind some C# functions to javascript functions. m_WebTexture.WebView.BindJavaScriptCallback("PlayGame", this.Callback_PlayGame); // Can be called from the HTML page by using: Unity.PlayGame(); m_WebTexture.WebView.BindJavaScriptCallback("GoToOptions", this.Callback_GoToOptions); // Unity.GoToOptions(); m_WebTexture.WebView.BindJavaScriptCallback("QuitGame", this.Callback_QuitGame); // Unity.QuitGame(); m_WebTexture.LoadURL(m_URL); }
// Use this for initialization void Start() { // Obtain the web texture component. m_WebTexture = GetComponent<AwesomiumUnityWebTexture>(); // Check to make sure we have an instance. if (m_WebTexture == null) { DestroyImmediate(this); } m_WebTexture.Initialize (); // Bind some C# functions to javascript functions. m_WebTexture.WebView.BindJavaScriptCallback("PlayGame", this.Callback_PlayGame); // Can be called from the HTML page by using: Unity.PlayGame(); m_WebTexture.WebView.BindJavaScriptCallback("GoToOptions", this.Callback_GoToOptions); // Unity.GoToOptions(); m_WebTexture.WebView.BindJavaScriptCallback("QuitGame", this.Callback_QuitGame); // Unity.QuitGame(); m_WebTexture.WebView.FinishLoadingFrame += myFinishLoadingCallback; m_WebTexture.WebView.ChangeAddressBar += myChangeAddressBarCallback; m_WebTexture.WebView.ShowCreatedWebView += myShowCreatedWebView; m_WebTexture.LoadURL(m_URL); }
// Use this for initialization void Start() { // Obtain the web texture component. m_WebTexture = GetComponent <AwesomiumUnityWebTexture>(); // Check to make sure we have an instance. if (m_WebTexture == null) { DestroyImmediate(this); } m_WebTexture.Initialize(); // Bind some C# functions to javascript functions. m_WebTexture.WebView.BindJavaScriptCallback("PlayGame", this.Callback_PlayGame); // Can be called from the HTML page by using: Unity.PlayGame(); m_WebTexture.WebView.BindJavaScriptCallback("GoToOptions", this.Callback_GoToOptions); // Unity.GoToOptions(); m_WebTexture.WebView.BindJavaScriptCallback("QuitGame", this.Callback_QuitGame); // Unity.QuitGame(); m_WebTexture.WebView.FinishLoadingFrame += myFinishLoadingCallback; m_WebTexture.WebView.ChangeAddressBar += myChangeAddressBarCallback; m_WebTexture.WebView.ShowCreatedWebView += myShowCreatedWebView; m_WebTexture.LoadURL(m_URL); }