I have a public void

Public void patreononclick(){Application.OpenURL("http://www.patreon.com/HubakaGs");}

Which supposed to open my patreon page when a button is tapped. But when i tap the button in the built application, nothing happens. I have assigned the function to the On Click() section of Button (Script). I am building the game for android patform and i use Unity 2017.1.0p4 Personal. How can i make the button to function properly?

Update: I changed the function to public void patreononclick(){ Debug.Log ("the game should open patreon"); Application.OpenURL("http://www.patreon.com/HubakaGs"); } But when the button is clicked, there is no message at the console.

  • 1
    \$\begingroup\$ Have you properly set the internet access permission? \$\endgroup\$
    – Tyyppi_77
    Aug 24 '17 at 10:39
  • \$\begingroup\$ How do i do that? \$\endgroup\$
    – Hubaka Gs
    Aug 24 '17 at 10:44
  • \$\begingroup\$ Set "Internet Access" in the "Android PlayerSettings" window to "Require", see here. \$\endgroup\$
    – Tyyppi_77
    Aug 24 '17 at 10:50
  • \$\begingroup\$ @Tyyppi_77 i did it and it still not working :( \$\endgroup\$
    – Hubaka Gs
    Aug 24 '17 at 12:01

After hours of pulling hair, i finally noticed that this

enter image description here

was set to off, so i set it to Editor And Runtime, and it worked perfectly, i can even open the link from the editor trough a browser.

  • \$\begingroup\$ I changed it to Editor and Runtime, still doesn't work. \$\endgroup\$
    – Mr Bitman
    May 17 '20 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.