Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

On Click () OpenURL

$
0
0
Hi,

I have the following script attached to an empty GameObject : -

Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4. using UnityEngine.SceneManagement;
  5.  
  6. public class facebookManager : MonoBehaviour {
  7.  
  8.     public void openURLFacebook()
  9.     {
  10.         Application.OpenURL("https://www.facebook.com/");
  11.     }
  12. }
Using the Unity GUI, I have set up a button, under the On Click () section, I have chosen the GameObject with the script applied, and then...

On Click () OpenURL

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>