Search Unity

Question Build Dedicated server by command line

Discussion in 'World Building' started by daraya16, Jan 3, 2023.

  1. daraya16

    daraya16

    Joined:
    Nov 3, 2022
    Posts:
    1
    Hi all,

    We are trying to create an automatic dedicated server build through the command line. However, we are not sure which is the correct build configuration to obtain that since there is not a BuildTarget like "Dedicated server" or similar.
    Currently, we are doing the our build with the below configuration:
    string[] scenes = {"XXX"};
    Debug.Log("UNITY_SERVER");
    BuildPipeline.BuildPlayer(scenes,"Outputname", BuildTarget.StandaloneWindows64, BuildOptions.EnableHeadlessMode);

    Our current output is not running when we tried to execute it in a CMD prompt, it showed an error "Failed to load mono" .
    Any suggestion is welcome.
     
  2. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
  3. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    BTW, this forum "world building" is not about "building" your game. ;-)