Esempio n. 1
0
 public void Refresh()
 {
     if (browserTexture != null && !browserTexture.isWebViewBusy())
     {
         browserTexture.GoToURL(GetNotesURL(CommunicationManager.CurrentTeamID));
     }
 }
Esempio n. 2
0
    public void SetNewURL(string url, bool updateServer)
    {
        if (url == "" || browserTexture == null)
        {
            return;
        }

        newUrl = url;
        nextUpdateServerOnLoadComplete = updateServer;

        // if webView is null it will load this, if it crashes it will load this on revive
        browserTexture.InitialURL = newUrl;

        if (browserTexture.webView == null)
        {
            newUrl = "";
            return;
        }

        if (!browserTexture.isWebViewBusy())
        {
            if (browserTexture.URL != newUrl)
            {
                updateServerOnLoadComplete = nextUpdateServerOnLoadComplete;
                if (!browserTexture.GoToURL(newUrl))
                {
                    Debug.LogError("Problem navigating to new url");
                }
            }
            if (browserTexture.webView.IsCrashed)
            {
                browserTexture.InitialURL = newUrl;
                browserTexture.ReviveWebView();
            }
            newUrl = "";
        }
        else
        {
            if (browserTexture.webView.IsCrashed)
            {
                Debug.LogError(newUrl + " Stopping nav for crashed " + crashedCount);
                browserTexture.ReviveWebView();
            }
        }
    }