Version: 2017.4
public static bool dedicatedServer ;

説明

専用サーバーとしてこのマシンを報告する。

サーバーとして実行されている場合、接続数はプレイヤー数を定義し、マスターサーバーに登録するときに報告されます。 デフォルトではマスターサーバーはこのインスタンスは専用サーバーではないと仮定しており、したがって、 count is incremented by one (to account for the \"client\" running on the server). If this is not desired this この変数を False に設定することができ、接続数だけがプレイヤー数としてホストデータで報告されます。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void StartServer() { Network.InitializeServer(32, 25002); MasterServer.dedicatedServer = true; MasterServer.RegisterHost("MyUniqueGameType", "JohnDoes game", "l33t game for all"); } }