Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

EC2 Headless with -batchmode

Discussion in 'Multiplayer' started by SirDevin, Sep 1, 2016.

  1. SirDevin

    SirDevin

    Joined:
    Oct 10, 2014
    Posts:
    30
    I am trying to run a headless EC2 Windows Server but cannot seem to get it to work. Any help would be appreciated.
     
  2. darthbator

    darthbator

    Joined:
    Jan 21, 2012
    Posts:
    169
  3. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    If it's a Unity build, run with the command line options -batchmode -nographics
     
  4. darthbator

    darthbator

    Joined:
    Jan 21, 2012
    Posts:
    169
    If you check the "headless" build option it will add those options for you so that you don't even need to do that.
     
  5. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I've been missing this, where is this option?
     
  6. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Ah, found it. That option only appears when building for Linux. The OP is building in Windows.
     
  7. SirDevin

    SirDevin

    Joined:
    Oct 10, 2014
    Posts:
    30
    Yes the issue is with building in Windows. So I have a build ready on my Windows EC2 and when i do
    -batchmode and -nographics is does not run. I did this on my local machine and it works great. Just to make sure I disabled all fire walls and other crap and it still does't work
     
  8. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I presume the exe runs ok - and there are no errors in the log file? Have you changed network addresses from your local test to the hosted one?
     
  9. SirDevin

    SirDevin

    Joined:
    Oct 10, 2014
    Posts:
    30
    Yes the exe runs fine on the local machine, and also yes the network address is updated.
     
  10. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Does the exe run on your hosted machine (not local), and with no errors in the log file?
     
  11. SirDevin

    SirDevin

    Joined:
    Oct 10, 2014
    Posts:
    30
    No and thats the issue, it just wont run at all. I am trying a linux build but am having issue there to. I'm not too familiar with it.
     
  12. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Is there anything in the log file to say why it failed to run, or is the failure happening before that? Try a small hello world project to see if that runs on the windows server. What's the actual OS? is it 64bit?
     
  13. SirDevin

    SirDevin

    Joined:
    Oct 10, 2014
    Posts:
    30
    No log file generated, its happening before. That's the thing, this is like a hello work project. There is just a cube object and some very basic networking to test out ec2. I currently run other command prompt servers for games off ec2, but I have no option to make one for unity.
     
  14. darthbator

    darthbator

    Joined:
    Jan 21, 2012
    Posts:
    169
    My bad I totally missed this. I sadly don't have experience running windows unity from the command prompt