Esempio n. 1
0
 private void Start()
 {
     gazeHead         = manager.GetComponent <ViveSR.anipal.Eye.GazeHeadPos>();
     head_Transform   = false;
     positionsCorrect = false;
     controller       = hand.GetComponent <ControllerCheck>();
     headbar_stable   = GameObject.FindGameObjectWithTag("headPosition");
     headbar_variable = GameObject.FindGameObjectWithTag("variable");
     headset          = GameObject.FindGameObjectWithTag("Camera");
     rig = GameObject.FindGameObjectWithTag("CameraRig");
 }
    // Start is called before the first frame update
    void Start()
    {
        // angular error between fixation and controller
        gazeHead = manager.GetComponent <ViveSR.anipal.Eye.GazeHeadPos>();
        controls = manager.GetComponent <ControlLevel_Trials>();

        // create a folder
        string OutputDir = Path.Combine(FolderName, string.Concat(DateTime.Now.ToString("MM-dd-yyyy"), FileName));

        Directory.CreateDirectory(OutputDir);

        // create a file to record data
        String trialOutput = Path.Combine(OutputDir, DateTime.Now.ToString("yyyy-MM-dd-HH-mm") + "_Results.txt");

        trialStreams = new FileStream(trialOutput, FileMode.Create, FileAccess.Write);

        //Call the function below to write the column names
        WriteHeader();
        controller = controls.gamecontroller;

        vector = new Vector3(0, 0, 0);
    }