Well, I hope the subject wasn't too annoying.
I've just switched to NGUI, and wow, what a life-saver. (Helping me get the GUI done about 4x as fast as previously hacking away at the )*EELJK GUI in Unity 4.3...
Anyway, I've got a label in my menus which has a box collider and a UIbutton (script) attached to it. It looks great!
I've also attached a script of my own to the label, which (in my other projects works & ) launches a web browser and opens the URL that I want to open.
But I cannot seem to get this script to launch the browser and open the url, when clicking on this label.
If it helps, here's the code in the script. Usually it's just attached to a game object (without NGUI) and when you click that game object, it opens the link in a browser:
public class MoreGamesLink : MonoBehaviour {
void openMoreGameLink(){
if (Input.GetMouseButtonDown (0)) {
Application.OpenURL ("
http://bitofgame.com/web/quad-king.html");
}
}
}
So, I've searched the NGUI forums and Unity Answers, but there's no specific help on this. I mean, clicking a game object and getting a web browser to launch with your desired url is fairly simple, but I cannot seem to get it to work, with the above setup.
I've also used the openurlonclick script instead of my own, with the label, but that also does absolutely nothing as well.
Anything that I'm doing wrong ? Thanks for any obvious or not-so-obvious pointers you can direct me with.