How to make a dedicated server console

Hi,

i’m looking to make a dedicated server console for my game but i have a problem.

When i launch the game with “-batchmode” in command line argument. i dont see anything.
The process is opened in background.
Why ?

i’m trying to make a dedicated server like craftbukkit or rust.

Thank you for you help

If you’re talking about what I think you want… You should use AllocConsole.

using System.Runtime.InteropServices;
using UnityEngine;

public class AllocConsoleHelper : MonoBehaviour
{
   [DllImport("kernel32")]
   private static extern bool AllocConsole();

   [DllImport("kernel32")]
   private static extern bool FreeConsole();

   void Awake()
   {
     AllocConsole();
   }

   void OnDestroy()
   {
     FreeConsole();
   }
}