Info

Running a server

  1. Build with a server platform config in the Build Tool (ServerWindows_Release or ServerLinux_Release)
  2. Put Configs/ServerConfig.json next to the build to set the server name, port and max players, see Local Configuration
  3. Start the executable in a terminal (Windows: double click the .exe, Linux: ./<App>.x86_64)

Using the terminal

Adding commands

ConsoleCommandHandler.RegisterCommand(new ConsoleCommand("kick", "kick a player by id", async args =>
{
    if (args.Length == 0)
    {
        ConsoleCommandHandler.AppendLog("[red]Usage:[/] kick <id>");
        return;
    }
    await UniTask.SwitchToMainThread();
    // kick the player
    ConsoleCommandHandler.AppendLog($"[green]Kicked[/] {args[0]}");
}));