Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. The Burst compiler has its own forum section now.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Executing scripts while Unity window is not in focus

Discussion in 'Scripting' started by PaulT, Dec 30, 2008.

  1. PaulT

    PaulT

    Joined:
    Oct 25, 2008
    Posts:
    17
    It seems like Unity3D stops executing code once the window is not in focus. This a good way to give some performance back to the user, once they need to do something else on their computer.
    Is it possible to change this setting? I can imagine this is just a setting which says:
    - no execution at all
    - only script execution, (no rendering)
    - execute all

    While I'm working with networking (RTMP implementation), it's pretty unuseful when the client doesn't respond anymore, simply because the window is out of focus. I only expect this to happen when there are connection problems on the client side. As the server notices that a client is unreachable for 30 seconds, it needs to disconnect that client.

    I'll be very thankful for an answer!
     
  2. Antonios

    Antonios

    Joined:
    Jul 28, 2008
    Posts:
    107
  3. PaulT

    PaulT

    Joined:
    Oct 25, 2008
    Posts:
    17
    Thank you very much Antonios! I had no idea where to find this.
     
unityunity