Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Helmut Duregger · Apr 14, 2012 at 12:32 PM · servercommand-linebatchmodecontinuous-integration

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Tseng · Apr 14, 2012 at 12:33 PM

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).

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Helmut Duregger · Apr 14, 2012 at 06:26 PM 0
Share

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.

avatar image Helmut Duregger · Apr 16, 2012 at 01:40 PM 0
Share

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!

avatar image yoyo · May 01, 2014 at 09:19 PM 0
Share

The documentation now indicates "A standalone player generated with this option will not feature any graphics." Sadly it does not suggest why on earth this is the case.

avatar image
1

Answer by alejandro-unity · Jun 11, 2015 at 08:51 PM

Hi, with the new lighting system Enlighten, you can not build the game or calculate the lightmaps with -nographics option since Enlighten needs the graphics device. Also if you are using Windows with Directx11 you can change -nographics with -force-driver-type-warp option to simulate the graphics device by software.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

-batchmode flag only available in PRO? 1 Answer

Does EditorApplication.update get called in -batchmode when calling -executeMethod? 1 Answer

what sort of thing is likely to cause my game (ran as server using -batchmode flag) to consume the entire CPU after about 8 hours of running? 2 Answers

Linux editor attempting to connect to X even in batch mode with -nographics. 0 Answers

Unity Command Line Fails to Get license 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges