// call it from shell (as program) private static void Main() { UDPDoubleArrSend sendObj = new UDPDoubleArrSend(); sendObj.init(); // testing via console // sendObj.inputFromConsole(); // as server sending endless }
// Use this for initialization void Start() { udpSender = GetComponent <UDPDoubleArrSend> (); triggerSender = GetComponent <UDPSend> (); stream = GetComponent <txtStreamReader> (); while (Directory.Exists("E:/HrTestData/" + participantID)) { participantID += 1; } Directory.CreateDirectory("E:/HrTestData/" + participantID); directoryPath = "E:/HrTestData/" + participantID + "/"; }
// Use this for initialization void Start() { // let's first get access to the other components of this object udpSender = GetComponent <UDPDoubleArrSend> (); triggerSender = GetComponent <UDPSend> (); stream = GetComponent <Main> (); // This is for the purpose of separating the different subjects you have recorded // each time the program is restarted it creates a new folder for the new participant, // in this way you know exactly which participant you are working with and the number that has been through. while (Directory.Exists("E:/HrTestData/" + participantID)) { participantID += 1; } Directory.CreateDirectory("E:/HrTestData/" + participantID); directoryPath = "E:/HrTestData/" + participantID + "/"; }