Exemplo n.º 1
0
    void OnReceivedMessageDelegate(UniWebView webView, UniWebViewMessage message)
    {
        Uri uri = null;

        try
        {
            uri = new Uri(message.rawMessage);
        }
        catch (Exception e)
        {
            return;
        }


        if (URLManager.CheckLoadURL(uri))
        {
            webView.Load(message.rawMessage);
        }
        else
        {
            Application.OpenURL(message.rawMessage);
        }

#if BUILD_TYPE_DEBUG
        Debug.Log("OnReceivedMessageDelegate: message.rawMessage" + message.rawMessage + " / " + webView.openLinksInExternalBrowser);
#endif
    }