- Home /
Make GUI button and attach HTML
I am trying to make a GUI button which shows up in the HUD and is a link to a website. How would I go about doing that. Mainly I am wondering what would i attach the scripting to? I am quite new to UNITY and your help is greatly appreciated. Thanks! Here's the scripting that I am using:
pramgma strict
function start (){ }
function on GUI(){ if (GUI.button(Rect(0.0200,100), "about")){ application.OpenURL("www.dogpile.com"): ) }
Answer by gbelini · Mar 14, 2013 at 07:30 PM
If i understand, is something like this:
function OnGUI() { if (GUI.Button(new Rect(100,100,200,75),"About")) { Application.OpenURL("www.dogpile.com"); } }
so... you could drag this script to main camera.
Please, let me know if thats work
Your answer
Follow this Question
Related Questions
GUI Button that is linked to a HTML page 2 Answers
gui text button dont work 1 Answer
GUI click through? 3 Answers
Button onClick events will not be triggered 1 Answer
Get rid of GUIButtons more efficiently 3 Answers