0
\$\begingroup\$

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.

\$\endgroup\$
  • 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
1
\$\begingroup\$

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.

\$\endgroup\$

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.