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");
           }

1 Answer

1

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:

http://unity3d.com/support/documentation/Manual/Detecting%20the%20Unity%20Web%20Player%20using%20browser%20scripting.html

Thanks so much ! I knew that there was a solution somewhere but it was poorly tagged ... Thanks again