public void CheckTrialValidity() { if (!tracking_is_locked && spheres.SpheresAreVisible()) { // if target is tracked and the tracking is not locked, then lock in the tracking tracking_is_locked = true; } else if (tracking_is_locked == true && spheres.SpheresAreVisible() == false) { // if tracking is locked in and the target is not tracked, trial is unvalid gui_script.NewDisplayMessage("Trial is not valid! Shut down the glasses!"); osc.SendMessage("trial_status:invalid"); ResetTrialParameters(); } }