- Home /
Question by
alexnode · Aug 18, 2010 at 07:29 PM ·
webplayerstandalonequitidentify
Is it possible to identify if a user is using webplayer or standalone?
Hi all, I was wandering if there is any way to identify if someone downloaded a standalone version or the webplayer, I would like to use it for a quit button as the example bellow ... Is that possible?
if (GUILayout.Button("Quit")) {
if (???applicationStandalone???)
{
Application.Quit();
}
if (???aplicationWebplayer???){
Application.OpenURL ("http://unity3d.com/");
}
Edit so the solutions is ...
if( Application.platform == RuntimePlatform.OSXWebPlayer || Application.platform == RuntimePlatform.WindowsWebPlayer )
{
Application.OpenURL ("http://tripleagent.co.uk/index.html");
}
if( Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.WindowsPlayer )
{
Application.Quit() ;
}
if( Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsEditor )
{
print ("Session Ended");
}
Comment
Best Answer
Answer by Julian-Glenn · Aug 18, 2010 at 07:33 PM
Answer is here: http://answers.unity3d.com/questions/2890/how-can-script-tell-if-its-in-web-player-vs-standalone
And if you mean detecting in the Browser then look here:
Thanks so much ! I knew that there was a solution somewhere but it was poorly tagged ... Thanks again