Search Issue Tracker

By Design

Votes

0

Found in

2018.4.0f1

2019.1.0a1

2019.2.0a1

2019.2.0f1

2019.3.0a1

Issue ID

1175054

Regression

No

Standalone builds result in black screen on launch when built using CL with -batchmode argument

Build Pipeline

-

How to reproduce:
1. Open the attached project ("case_1175054-BatchModeTest.zip") using the EnvIronman VM (optional) (more information in Edit)
2. Make a standalone build and run it
3. Notice that the screen is not black
4. Edit the "Assets/Editor/Builder.cs" script with the desired build path
5. Edit the "Assets/UnityBuild.bat" file to have paths to your Unity Editor and the project and then run it
6. Run the newly generated batch mode build

Expected results: The game screen is not black
Actual results: The game screen is black when the player is built with -batchmode command

Reproducible with: 2018.4.6f1, 2019.1.14f1, 2019.2.1f1, 2019.3.0a12
Couldn't test with 2017.4 because of mising namespaces

  1. Response avatar

    Resolution Note:

    https://docs.unity3d.com/ScriptReference/BuildPlayerOptions.html
    BuildPlayerOptions.scenes is not populated in user script, and thus will only build the active scene. Batch mode opens a default empty scene. This results in a build with only an empty scene. Please populate the scenes array with desired scenes to build.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.