// activated by UI launch button public void DoLaunchExperiment() { if (manager.syncBox.IsRunning()) { cantGoPrompt.GetComponent <UnityEngine.UI.Text>().text = "Can't start while Syncbox Test is running"; cantGoPrompt.SetActive(true); return; } if (participantNameInput.text.Equals("")) { cantGoPrompt.GetComponent <UnityEngine.UI.Text>().text = "Please enter a participant"; cantGoPrompt.SetActive(true); return; } if (!isValidParticipant(participantNameInput.text)) { cantGoPrompt.GetComponent <UnityEngine.UI.Text>().text = "Please enter a valid participant name (ex. R1123E or LTP123)"; cantGoPrompt.SetActive(true); return; } int sessionNumber = UpdatedParticipantSelection.nextSessionNumber; manager.ChangeSetting("participantCode", participantNameInput.text); manager.ChangeSetting("session", sessionNumber); launchButton.SetActive(false); loadingButton.SetActive(true); manager.Do(new EventBase(manager.LaunchExperiment)); }