Exemplo n.º 1
0
        /// <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
        }
Exemplo n.º 2
0
        /// <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
        }
Exemplo n.º 3
0
    /// <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);
    }
Exemplo n.º 4
0
 public void Load()
 {
     UniWebViewPlugin.Load(((Object)((Component)this).get_gameObject()).get_name(), !string.IsNullOrEmpty(this.url) ? this.url.Trim() : "about:blank");
 }
Exemplo n.º 5
0
    public void Load()
    {
        string text = (!string.IsNullOrEmpty(this.url)) ? this.url.Trim() : "about:blank";

        UniWebViewPlugin.Load(base.gameObject.name, text);
    }