x


Launch Web browser & web site from GUI

is it possible in Unity to say launch a web browser and take someone to a web page URL by clicking on text inside of say a GUI pop Up window? And if so how would that be done?

more ▼

asked Nov 14 '11 at 01:15 AM

Michael 12 gravatar image

Michael 12
132 87 99 106

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

The way I've done this is by using:

if(GUILayout.Button("Visit Web Site"))
       {
         Application.OpenURL("http://www.yoursite.com");
       }

so I bet by changing the button to :

GUILayout.Box

you can get needed results

more ▼

answered Nov 14 '11 at 04:09 AM

RecChemForbin gravatar image

RecChemForbin
20 5 5 9

No, if you change it to GUILayout.Box it'll no longer be clickable. You need to use a button for this.

Nov 14 '11 at 04:10 AM syclamoth

you are correct sir! just use the button

Nov 14 '11 at 04:23 AM RecChemForbin

Thanks guys, but say I have an interactive shop and I want to have a little pop up GUI for each product in the shop and a different web link for each product, is that doable and if so how?

Nov 14 '11 at 01:39 PM Michael 12

I don't know that you can have pop-up windows for new Unity scenes, but one way you may approach it is to break up each product into a new scene that stays in the same "window", then have the button link to the web site for purchase or whatever your needing which would pop up into a browser window. You can customize your GUI skin to make your buttons appear however you like in the editor and photoshop. there very well may be other ways to approach this that suits you better though

http://unity3d.com/support/resources/assets/built-in-gui-skin

hope that helps a little!

Nov 15 '11 at 03:07 AM RecChemForbin

Thanks RecChemForbin, I've hered of making a scene load into an existing scene, how is this done and can I do it for multiple produts? I want to put atleast 100 or so products into my first person perspective gift shop and have an information pop up containing a more detailed picture of the product and a web link that is clickable that takes them to the product page online. How can I do this?

Nov 26 '11 at 04:04 PM Michael 12
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x56
x52
x23
x19
x2

asked: Nov 14 '11 at 01:15 AM

Seen: 1953 times

Last Updated: Nov 26 '11 at 04:04 PM