- Home /
How can I call an URL?
Maybe this is a silly question, but i have like 3 days using Unity, I made a great 3d place, but now i want to call a webpage
I know how to setup a GUI button
function OnGUI () {
if (GUI.Button (Rect (380,10,150,50), "Visit WEBPAGE")) {
// what do i have to put here?//
}
}
Can someone help? is there a way to call a pop up also?
Are you asking for the html code from the webpage or to open up a web page in a browser or to display a fully rendered webpage inside your unity app?
Answer by Ashkan_gc · Jan 08, 2010 at 07:21 AM
if you want to open a URL in your browser use Application.OpenURL:
Application.OpenURL("http://www.example.com");
if you want to get the HTML code of the page use www class. if you want to render the page in your scene you should use some internet service that turns a webpage to a JPEG or PNG image and send it back to you. if you want a full 3D browser in your game vote for this please
Works incredible, so many thanks, lol
I work with actions script, thats why I find hard to understand these basic scripts
Thanks again!
Hello Ashkan I want to use full 3d browser in game but your link is not working ... can you send me the correct link.
http://feedback.unity3d.com/pages/15792-unity/suggestions/291587-gui-integrated-html-web-browser
This is incorrect link .
Or please send /update the code here itself
Thanks..
Your answer
Follow this Question
Related Questions
How would I go about getting the results of a javascript variable to a string inside script? 3 Answers
Is Unity a good fit for an embedded (web) model file browser? 1 Answer
Android : Open the phones web browser 1 Answer
Browser to webplayer communication problem 0 Answers
Capturing sound input with low latency 0 Answers