Search Unity

"server Build" Vs Batchmode/nographics

Discussion in 'Multiplayer' started by joshenes, Apr 11, 2019.

  1. joshenes

    joshenes

    Joined:
    Apr 18, 2014
    Posts:
    48
    Previously I would use -batchmode -nographics for running a server instance. With the new Server Build option is there any reason to still use those flags (for a server), or are they redundant?
     
  2. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    146
    They seem redundant. but the server build is not some magical switch.
    You still can get a lot of performance out of your server by stripping it of all models, textures, sound, particles and so on in runtime, for some reason unity still loads all of those.....
     
  3. joshenes

    joshenes

    Joined:
    Apr 18, 2014
    Posts:
    48
    Yes I maintain a separate project for this purpose to keep the size of the server build very small and ensure no art assets are loaded.
     
  4. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I too build with a separate server project. I run the servers with -batchmode -nographics so they run as services. If I tick the "server" checkbox on the build window, the resultant exe doesn't work as a service.
     
    TwoTen likes this.
  5. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Are you talking Windows Services here?
     
  6. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Service as in runs in the background without a window or blocking console/dos window
     
  7. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    ./myServerExecutable &

    I don't understand what you mean exactly by service, and why doesn't it work as a service when the box is ticked?
     
  8. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    A windows service is a background task. Not sure what the issue was with the server checkbox - think it still brought up a window. Not sure as not in the office right now :)
     
  9. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Right I was just asking what you ment by "service", I don't use Windows that much so I didn't know if you meant a systemd service, Windows service or the XNU equivalent.