So I am trying to make a button that opens up to a webpage when clicked. Here is the code for the function:
public void ToHyperLink()
{
string theURL = parentButton.GetComponent<BLButton>().btnRefObj.GetComponent<HyperlinkAttri>().prodURL;
Application.OpenURL(theURL);
}
The URL is passed through the inspector like this:
This works perfectly fine when testing it on my PC, but once it is built to my Android phone it stops working.
CodePudding user response:
Just tested it. Application.OpenURL("http://google.com");
works fine.Give the link directly and check if it is coming.You can install Android Logcat from package manager and connect android phone via usb and click build and run and check for any errors.