Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Splash Screen Shown in Batch Mode

Discussion in '2022.2 Beta' started by SonicBloomEric, Jul 22, 2022.

  1. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    1,090
    When running Unity 2022.1 and 2022.2.0b2 in Batch Mode the Splash Screen is shown much/all of the time. This is silly. Please either disable the splash screen from appearing when the -batchmode flag is passed on the command line or provide another command line flag to disable it.
     
  2. justinas_p

    justinas_p

    Unity Technologies

    Joined:
    Nov 7, 2016
    Posts:
    6
    Hi! Unfortunately, I could not reproduce this problem on a newly created project. Could you please submit a bug report that contains your example project and full command line arguments list you are using when launching the project? It would help us a lot. Thanks in advance!
     
  3. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    1,090
    Huh. I created a fresh project and tossed together a super simple script and was able to reproduce it. Here's the script:

    Code (CSharp):
    1. using System.Threading;
    2. using UnityEngine;
    3.  
    4. public class Test
    5. {
    6.     // This is run with the following command (on macOS):
    7.     //      /Applications/Unity/Hub/Editor/2022.2.0b2/Unity.app/Contents/MacOS/Unity -quit -noUpm -batchmode -logFile /dev/stdout -projectPath . -executeMethod Test.RunLargeProcess
    8.     //  For even more time with the splash screen, remove the "-noUpm" option.
    9.     //
    10.     // Note that the splash screen will appear behind other windows, so you may
    11.     //  need to go hunting.
    12.     public static void RunLargeProcess()
    13.     {
    14.         // Sleep for 10 seconds, simulating a long-running script process
    15.         //  doing good works for the user.
    16.         for (int i = 0; i < 10; ++i)
    17.         {
    18.             Thread.Sleep(1000);
    19.             Debug.Log($"Work item {i + 1} complete.");
    20.         }
    21.     }
    22. }
    The comment in the code above shows you the command to run (assuming you're on macOS and your working directory is the project's root directory). For avoidance of doubt, here's what I use:

    -quit -noUpm -batchmode -logFile /dev/stdout -projectPath . -executeMethod Test.RunLargeProcess


    I have also verified that the issue occurs when you reduce the command to the following:

    -quit -batchmode -projectPath . -executeMethod Test.RunLargeProcess


    Which is sort of the "minimal flags" case.

    The Splash Screen also appears behind other windows when it does arrive.

    I have also filed a bug [IN-11342] about this. The test project includes a screenshot of the issue.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Just a random guess: you didn't specify which OS you were on and Justinas tested it on Windows :p. It illustrates why bug reports are so valuable: in addition to just your message, we also get all your system information and logs which can be crucial to figuring out bugs.
     
    SonicBloomEric likes this.
  5. justinas_p

    justinas_p

    Unity Technologies

    Joined:
    Nov 7, 2016
    Posts:
    6
    Thank you for providing more details, it was really helpful! I'm glad to tell you that the fix is ready and it is on its way to land.

    Tautvydas - that's correct, initially, I was testing it on Windows.
     
    SonicBloomEric likes this.