コード例 #1
0
ファイル: WWebView.cs プロジェクト: RelinkaKing/UnityPC
        /// <summary>
        /// Gets the user-agent string currently used in webview.
        /// If a customized user-agent is not set, the default user-agent in current platform will be returned.
        /// </summary>
        /// <returns>The user-agent string in use.</returns>
        public string GetUserAgent()
        {
            Setup();

#if UNIWEBVIEW3_SUPPORTED
            return(UniWebViewInterface.GetUserAgent(listener.Name));
#elif UNIWEBVIEW2_SUPPORTED
            return(UniWebViewPlugin.GetUserAgent(listener.Name));
#else
            return(WWebViewPlugin.GetUserAgent(listener.Name));
#endif
        }
コード例 #2
0
 /// <summary>
 /// Gets the user agent string currently used in web view.
 /// If a customized user agent is not set, the default user agent in current platform will be returned.
 /// </summary>
 /// <returns>The user agent string in use.</returns>
 public string GetUserAgent()
 {
     return(UniWebViewInterface.GetUserAgent(listener.Name));
 }