x


No graphics in build with -batchmode -nographics

Hello,

Using Unity 3.5.1 with the following command line options to create a build

-batchmode
-nographics
-quit
-logFile FOO
-projectPath BAR
-buildWindowsPlayer BADABOO

The build is created and the game can be run, but the screen remains black. Still the game responds to keyboard inputs (ESC for Application.Quit).

When I ommit the -nographics option the build has the visuals.

The documents don't indicate such a connection. As far as I understand it, we should be able to build on a headless Windows server.

Btw. both results can be reproduced on a regular Windows 7 installation (no server).

How can we use -batchmode -nographics to create a build on a Windows server without requiring us to install Direct3d etc.?

Thanks for any hints!

edit: Removed link to forum, apparently the post was removed.

more ▼

asked Apr 14 '12 at 12:32 PM

Helmut Duregger gravatar image

Helmut Duregger
2 1 1 2

(comments are locked)
10|3000 characters needed characters left

1 answer: sort oldest

Actually the documentation does tell it

-nographics (Windows only) When running in batch mode, do not initialize graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU.

The second sentance, about automated workflows. Automated workflows only work, when you have a windows in focus, otherwise you can't send simulated input commands (i.e. prerecorded user input).

more ▼

answered Apr 14 '12 at 12:33 PM

Tseng gravatar image

Tseng
1.5k 6 8 23

Thank you for the info!

So I guess possible automated workflows with -nographics

  • include things like AssetBundle generation and running some tests
  • exclude taking screenshots (obvious) and generating a Standalone Player that does render more than a black screen (not so obvious).

I don't understand why the Unity Editor requires a graphics device to generate a Standalone Player that has visuals.

New to UnityAnswers, will wait a bit for more feedback before approving your answer.

Apr 14 '12 at 06:26 PM Helmut Duregger

Ok, seems to really be the case that this somehow refers to the Editor instance running and the Standalone Player generated.

Will suggest to Unity that they make this clearer.

Thank you for your answer!

Apr 16 '12 at 01:40 PM Helmut Duregger
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x414
x33
x21
x5

asked: Apr 14 '12 at 12:32 PM

Seen: 978 times

Last Updated: Apr 16 '12 at 01:44 PM