Ejemplo n.º 1
0
                private void OnGUI()
                {
                    if (GUILayout.Button("Set Parameter"))
                    {
                        EyeParameter parameter = new EyeParameter
                        {
                            gaze_ray_parameter = new GazeRayParameter(),
                        };
                        Error error = SRanipal_Eye_API.GetEyeParameter(ref parameter);
                        Debug.Log("GetEyeParameter: " + error + "\n" +
                                  "sensitive_factor: " + parameter.gaze_ray_parameter.sensitive_factor);

                        parameter.gaze_ray_parameter.sensitive_factor = parameter.gaze_ray_parameter.sensitive_factor == 1 ? 0.015f : 1;
                        error = SRanipal_Eye_API.SetEyeParameter(parameter);
                        Debug.Log("SetEyeParameter: " + error + "\n" +
                                  "sensitive_factor: " + parameter.gaze_ray_parameter.sensitive_factor);
                    }

                    if (GUILayout.Button("Launch Calibration"))
                    {
                        SRanipal_Eye_API.LaunchEyeCalibration(IntPtr.Zero);
                    }
                }