Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Access to other windows processes?

Discussion in 'Editor & General Support' started by AliAzin, Oct 16, 2009.

  1. AliAzin

    AliAzin

    Joined:
    Jun 25, 2009
    Posts:
    51
    Hi there,

    Can I access to other windows processes to see if they are running?

    I used
    Code (csharp):
    1. System.Diagnostics.Process.GetProcessesByName("notepad")
    but unity says :

    Code (csharp):
    1. SystemException : The process has exited

    Any help whould be appreciated.
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Hiya.

    Let me answer that in a roundabout kind of way. If you visited, oh, let's say the BBC news website news.bbc.co.uk, would you expect it to open notepad? If you went to Amazon.co.uk, and Amazon threw up a prompt saying "I can see you are running Dendrophile Anti-Virus, we're disabling this because it will give you a better browsing experience on our site" what would you think? I *think* you would say "what on earth is that website doing touching my machine".

    What I am getting at, is that Unity games running inside a web browser have *intentionally* restricted access to the machine they are running on. We believe that this is in the best interest of your customers.

    If you want to have access to the host machine, then you game needs to be written using Unity Pro, and your code should be in a plugin (i.e. be native code written in C++). If you do this, your game can only be shipped as a standalone executable and not as a webplayer.

    Hope this helps,
    Graham
     
  3. AliAzin

    AliAzin

    Joined:
    Jun 25, 2009
    Posts:
    51
    Ok, Thanks .