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

Question Is it possible to keep app running even when minimized?

Discussion in 'Windows' started by Klausbdl, Aug 25, 2023.

  1. Klausbdl

    Klausbdl

    Joined:
    Aug 12, 2013
    Posts:
    39
    I'm developing a V-Tuber app and I'd like to keep the app running properly even when minimized. I already tried checking the "Run in Background" setting but it still freezes when I minimize the app (click the _ button on the window's top right).
    I searched the web and I only found this thread that doesn't have a proper solution: Run Unity App Minimized on Windows - Questions & Answers - Unity Discussions. Thank you.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,498
    Which platform are you targeting? Run in background should prevent the app pausing when minimized.
     
  3. Klausbdl

    Klausbdl

    Joined:
    Aug 12, 2013
    Posts:
    39
    For Windows. I use the app as a greenscreen to display an avatar that moves and talks. When I start capturing the app's window in OBS and minimize it, I can see the avatar freezing.

    Video I recorded demonstrating:

     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,498
    Are you sure the game is actually pausing? From what I can tell in your video, you make the character move by moving your mouse. It is expected that your game will not receive mouse input when the game is minimized. It shouldn't be pausing, though.

    Perhaps you can print stuff to the log in your Update() function? That should demonstrate that it keeps running even when minimized.
     
  5. Klausbdl

    Klausbdl

    Joined:
    Aug 12, 2013
    Posts:
    39
    Yes, I think I notice the problem. Yes, I'm using the cursor position to move the avatar's head, so when the window is minimized, its like the screen is at the bottom corner, so there's no "area" for the cursor to move the head around.
    I just run the same test again and I noticed the head moving just a tiny bit, so that proves the app isnt pausing.
    This is one of those problems that you find the source of it after posting on the forum :confused: