Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question windows dedicated server build

Discussion in 'Windows' started by bugfinders, Dec 26, 2023.

  1. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,215
    I decided to learn some multiplayer stuff, and so, i have a windows server i can run things on, so, i built a dedicated server for windows, but what i dont seem to be able to do is cleanly shut it down.

    why do i care?

    well on firing up the server, i send the join code to a website so clients can auto join, as i couldnt find any docs as to how to get the joincode otherwise for clients.
    So when the server turns off, for any reason on shutdown, crash etc, i want it to update the code to empty to incidate no server.

    if i run it in the editor as configured for dedicated build it works a treat, on pressing any key it shuts down cleanly.
    If run as a built exe, the input has no effect, and it barfs saying the networkmanager is null.

    how can i do some form of graceful quit under windows?