public void Calibration() { FoveManager.EnsureEyeTrackingCalibration(); }
// Currently does not support editing of multiple objects at once. // I do not anticipate any problems with this since you should only // ever really have one per scene anyway. public sealed override void OnInspectorGUI() { // A decent style. Light grey text inside a border. helpStyle = new GUIStyle(GUI.skin.box); helpStyle.wordWrap = true; helpStyle.alignment = TextAnchor.UpperLeft; helpStyle.normal.textColor = Color.red; // Update the serializedobject serializedObject.Update(); // Cache the editor's playing state so we can prevent editing fields that shouldn't update during // a live play session. bool isPlaying = EditorApplication.isPlaying; EditorGUILayout.Space(); EditorGUILayout.LabelField("Client fetches and sync:", EditorStyles.boldLabel); EditorGUI.BeginChangeCheck(); { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_gaze, fetchGazeLabel); EditorGUILayout.PropertyField(_orientation, fetchOrientationLabel); EditorGUILayout.PropertyField(_position, fetchPositionLabel); EditorGUI.indentLevel--; } EditorGUILayout.Space(); EditorGUILayout.PropertyField(_eyeTargets); EditorGUILayout.PropertyField(_poseType); EditorGUILayout.PropertyField(_gazeCastPolicy); GUI.enabled = true; _showCullingMasks = EditorGUILayout.Foldout(_showCullingMasks, "Per-Eye Culling Masks"); if (_showCullingMasks) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_cullMaskLeft); EditorGUILayout.PropertyField(_cullMaskRight); EditorGUI.indentLevel--; } GUI.enabled = true; _showCompositorAttribs = EditorGUILayout.Foldout(_showCompositorAttribs, "Compositor options"); if (_showCompositorAttribs) { GUI.enabled = !isPlaying; EditorGUI.indentLevel++; //EditorGUILayout.PropertyField(_compositorLayerType); EditorGUILayout.PropertyField(_compositorDisableTimewarp); EditorGUILayout.PropertyField(_compositorDisableDistortion); EditorGUI.indentLevel--; } GUI.enabled = true; if (isPlaying && GUILayout.Button("Ensure calibration")) { Debug.Log("Manually triggering eye tracking calibration check from inspector..."); FoveManager.EnsureEyeTrackingCalibration(); } if (Application.targetFrameRate != -1) { GUILayout.Label( "WARNING: Your target framerate is set to " + Application.targetFrameRate + ". Having a target framerate can artificially slow down FOVE frame submission. We recommend disabling this." , helpStyle , GUILayout.ExpandWidth(true)); } serializedObject.ApplyModifiedProperties(); }