Exemple #1
0
    protected virtual void Start()
    {
        if (ShouldStartServerInEditor() && startMaster)
        {
            // If we need to start the master server
            if (masterServer == null)
            {
                logger.Error("You have selected to start a master server, but there's no " +
                             "master server object in the scene");
                return;
            }

            // Enable master server object
            masterServer.gameObject.SetActive(true);

            // If auto start in editor is not selected
            if (!masterServer.AutoStartInEditor)
            {
                masterServer.StartServer();
            }
        }
    }
 public void startMasterPressed()
 {
     masterButton.interactable = false;
     masterBehaviour.StartServer(int.Parse(portField.text));
 }
Exemple #3
0
 public void OnStartMasterClick()
 {
     MasterServer.StartServer(MasterServer.Port);
 }