- Home /
Refresh the whole webpage in the player
I want to refresh or exit the webpage from the webplayer. Is this possible? Application.Quit doesn't work with the webplayer. Reloading the scene is not an option at this moment. I just want a quick and dirty way to "Exit" the webplayer.
Answer by Screenhog · Sep 14, 2012 at 06:06 PM
Application.ExternalCall appears to send a message to the page that the Unity WebPlayer is in. I don't know much about webpage development, but I'm sure you can make a page refresh using code within the page itself.
Answer by Ayrik · Sep 14, 2012 at 06:32 PM
Try this: Application.ExternalEval
Application.ExternalEval("document.location.reload(true)");
If that doesn't work, try the other calls from this site (or google it yourself if you'd like :))
If someone is looking for a answer, this is obselete now.
New guide: https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Unity Web Player - GAE 1 Answer
Lock Cursor to Screen resolution 1 Answer
What can be wrong with my Internet Explorer 8.0 installation/settings? 1 Answer
Unity web player for Ubuntu? -1 Answers