Search Unity

Dedicated server support for multiplayer?

Discussion in 'Multiplayer' started by atten0007, Oct 21, 2021.

  1. atten0007

    atten0007

    Joined:
    Jun 25, 2021
    Posts:
    45
    Hi folks,

    I'm currently making a game named "Planetsave" in Unity3D, that tells the player to save our environment. But currently I only can play my game in the singleplayer mode, I want to play it in the multiplayer mode. Now to my question: Is it possible to create with the Unity MLAPI multiplayer games with dedicated server support? I'm asking you this here because I want to make my game playable with friends.

    Sincerely yours,
    Atten007
     
  2. landinghand

    landinghand

    Joined:
    Jan 27, 2022
    Posts:
    4
    Hey, that is indeed doable. You could consider the possibility of using like Mirror or Darkrift 2 if you want to develop a multiplayer game.
     
  3. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
    Netcode for GameObjects (formerly known as MLAPI) allows for dedicated servers. To run a dedicated server you'd simply build your game as a "server build" in the build settings and run "StartServer" on the NetworkManager to start a server instance of the game.
     
  4. Moridorn

    Moridorn

    Joined:
    Jul 28, 2016
    Posts:
    4
    How do you handle testing of the dedicated server? or hiding the server logic from possible decompilation of your assemblies?

    #if UNITY_SERVER is definitely not practical for developing, but it's practical for hiding server side code in the client build.