Search Unity

Unity Application Priority Problems

Discussion in 'Scripting' started by Clonze, Sep 11, 2020.

  1. Clonze

    Clonze

    Joined:
    Dec 15, 2012
    Posts:
    26
    Hello! I develop a tool more so than a game. A lot of the time the tool is minimized, and if the user is playing a AAA game in full-screen mode, it seems to cause my unity application to turn sluggish. Performance is extremely important in this case because it's used by live streaming broadcasters.

    I'm looking for tips or advice to solve this issue.

    My Application info:
    -86x build
    -version 2019.4.1f1
    -windowed mode
    -Runs in background property checked
     
    Last edited: Mar 11, 2021
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911
    What is it doing while it's minimized?
     
  3. Clonze

    Clonze

    Joined:
    Dec 15, 2012
    Posts:
    26
    rendering characters walking back and forth pretty much. nothing special.
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911
    If it's minimized, wouldn't anything it's rendering not be visible anyway?
     
  5. Clonze

    Clonze

    Joined:
    Dec 15, 2012
    Posts:
    26
    it's being rendered for a live stream overlay, so, the user doesn't see it, but viewers do.
     
  6. Emiliana_vt

    Emiliana_vt

    Joined:
    Apr 7, 2018
    Posts:
    13
    While I've not encountered it myself, I've also had several users of my application, which is used to render a single 3D character and overlay it on a stream in a similar manner, complain about this. At first I assumed it was just them having an older GPU, but it also occured for people using an RTX 2080. I'm still looking for a reliable solution.

    Things that reportedly helped in some very few cases were:
    • Turning hardware accelerated GPU scheduling on or off in the Windows graphics settings
    • Setting nvidia drivers to max performance and turning texture filtering quality to high performance

    Things that seem to make no difference at all:
    • Setting process priority in Windows
    Other things I've found, but haven't heard results from so far:
    • Apparently Windows game mode can cause these issues when enabled, but nobody I asked so far had it enabled
    • I haven't tried it, but maybe the IDXGIDevice::SetGPUThreadPriority API could help, although I'm not hopeful
    Any other leads on how to fix this would be greatly appreciated.

    Unity version: 2019.4.16f1
     
  7. Clonze

    Clonze

    Joined:
    Dec 15, 2012
    Posts:
    26
    Thanks for posting some of your findings :D. I'm also still looking for any leads on fixing this problem.