/// <summary> /// Navigate a url in current webview. /// </summary> /// <param name="url">The URL to be navigated</param> public void Navigate(string url) { Setup(); #if UNIWEBVIEW3_SUPPORTED UniWebViewInterface.Load(listener.Name, url, false); #elif UNIWEBVIEW2_SUPPORTED UniWebViewPlugin.Load(listener.Name, url); #else WWebViewPlugin.Load(listener.Name, url); #endif }
/// <summary> /// Navigate a local file in current webview. /// </summary> /// <param name="file">Full path file name to be navigated.</param> public void NavigateFile(string file) { Setup(); string fullPath = #if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_IOS Path.Combine("file://" + Application.streamingAssetsPath, file); #elif UNITY_WSA "ms-appx-web:///Data/StreamingAssets/" + file; #elif UNITY_ANDROID Path.Combine("file:///android_asset/", file); #else string.Empty; #endif #if UNIWEBVIEW3_SUPPORTED UniWebViewInterface.Load(listener.Name, fullPath, false); #elif UNIWEBVIEW2_SUPPORTED UniWebViewPlugin.Load(listener.Name, fullPath); #else WWebViewPlugin.Load(listener.Name, fullPath); #endif }
/// <summary> /// Load the url set in <seealso cref="url"/> property of this UniWebView. /// </summary> public void Load() { string loadUrl = String.IsNullOrEmpty(url) ? "about:blank" : url.Trim(); UniWebViewPlugin.Load(gameObject.name, loadUrl); }
public void Load() { UniWebViewPlugin.Load(((Object)((Component)this).get_gameObject()).get_name(), !string.IsNullOrEmpty(this.url) ? this.url.Trim() : "about:blank"); }
public void Load() { string text = (!string.IsNullOrEmpty(this.url)) ? this.url.Trim() : "about:blank"; UniWebViewPlugin.Load(base.gameObject.name, text); }