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)); }
public void OnStartMasterClick() { MasterServer.StartServer(MasterServer.Port); }