static void OpenGameURL(string url)
 {
     if (UnityConnectSession.loggedIn)
     {
         UnityConnectSession.OpenAuthorizedURLInWebBrowser(url);
         return;
     }
     Application.OpenURL(url);
 }
 static void OpenConnectUrl(string url)
 {
     if (UnityConnectSession.instance.GetAccessToken().Length > 0)
     {
         UnityConnectSession.OpenAuthorizedURLInWebBrowser(url);
     }
     else
     {
         Application.OpenURL(url);
     }
 }
        private Widget renderProjectUrl()
        {
            var url = widget.shareState.url;

            return(new GestureDetector(
                       child:
                       new Container(
                           margin: EdgeInsets.only(top: 20),
                           child: new Text(url, style: new TextStyle(height: 1.2f, fontSize: 15f, color: new Color(0xFF2196F3), fontWeight: FontWeight.w700))
                           ),
                       onTap: () =>
            {
                if (UnityConnectSession.loggedIn)
                {
                    UnityConnectSession.OpenAuthorizedURLInWebBrowser(url);
                }
                else
                {
                    Application.OpenURL(url);
                }
            }
                       ));
        }
        private Widget renderSuccessWidget()
        {
            var list = new List <Widget>
            {
                renderUploadingHead(),
                new Container(
                    color: new Color(0xFFF6F6F6),
                    padding: EdgeInsets.only(left: 40, right: 40, bottom: 70),
                    child: new Column(
                        children: new List <Widget> {
                    renderIcon(Icons.cloud_done),
                    renderHighlightedLabel("Upload completed:"),
                    renderProjectUrl(),
                    renderNormalLabel("You can play your game in a web browser and share it with your friends!")
                }
                        ),
                    constraints: BoxConstraints.expand().widthConstraints(),
                    alignment: Alignment.center
                    )
            };

            // Open the shared game automatically in the web browser.
            if (UnityConnectSession.loggedIn)
            {
                UnityConnectSession.OpenAuthorizedURLInWebBrowser(widget.shareState.url);
            }
            else
            {
                Application.OpenURL(widget.shareState.url);
            }

            return(new Container(
                       color: new Color(0xFFF6F6F6),
                       padding: EdgeInsets.only(top: 10),
                       child: new Column(children: list, mainAxisAlignment: MainAxisAlignment.spaceBetween)
                       ));
        }