Ejemplo n.º 1
0
            public override void Inspector()
            {
                if (!headTarget.humanoid.steam.enabled || !SteamVRSupported())
                {
                    return;
                }

                CheckHmdComponent(headTarget);

                enabledProp.boolValue      = Target_Editor.ControllerInspector(headTarget.steamVR, headTarget);
                headTarget.steamVR.enabled = enabledProp.boolValue;
                headTarget.steamVR.CheckSensorTransform();
                if (!Application.isPlaying)
                {
                    headTarget.steamVR.SetSensor2Target();
                    headTarget.steamVR.ShowSensor(headTarget.humanoid.showRealObjects && headTarget.showRealObjects);
                }

                if (enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", headTarget.steamVR.sensorTransform, typeof(Transform), true);
                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 2
0
            public override void Inspector()
            {
                if (!handTarget.humanoid.hydra.enabled)
                {
                    return;
                }

                CheckSensorComponent(handTarget);

                enabledProp.boolValue    = Target_Editor.ControllerInspector(handTarget.hydra, handTarget);
                handTarget.hydra.enabled = enabledProp.boolValue;
                handTarget.hydra.CheckSensorTransform();

                if (enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", handTarget.hydra.sensorTransform, typeof(Transform), true);
                    EditorGUI.indentLevel--;
                }
                else
                {
                    RemoveTransform(handTarget.hydra.sensorTransform);
                    sensorTransformProp.objectReferenceValue = null;
                }
            }
            public override void Inspector()
            {
                if (!headTarget.humanoid.realsenseTracker.enabled)
                {
                    return;
                }

                enabledProp.boolValue        = Target_Editor.ControllerInspector(sensor, headTarget);
                headTarget.realsense.enabled = enabledProp.boolValue;
                if (headTarget.realsense.enabled)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.BeginHorizontal();
                    headTarget.realsense.headTracking = EditorGUILayout.ToggleLeft("Head Tracking", headTarget.realsense.headTracking);
                    if (headTarget.realsense.headTracking)
                    {
                        headTarget.realsense.rotationTrackingAxis = (IntelRealsenseHead.RotationTrackingAxis)EditorGUILayout.EnumPopup(headTarget.realsense.rotationTrackingAxis);
                    }
                    EditorGUILayout.EndHorizontal();
#if hFACE
                    headTarget.face.realsenseFace.faceTracking = EditorGUILayout.ToggleLeft("Face Tracking", headTarget.face.realsenseFace.faceTracking);
                    headTarget.face.realsenseFace.eyeTracking  = EditorGUILayout.ToggleLeft("Eye Tracking", headTarget.face.realsenseFace.eyeTracking);
#endif
                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 4
0
 public override void Inspector()
 {
     if (hipsTarget.humanoid.kinectTracker.enabled)
     {
         enabledProp.boolValue = Target_Editor.ControllerInspector(sensor, hipsTarget);
     }
 }
Ejemplo n.º 5
0
            public override void Inspector()
            {
#if hSTEAMVR
                if (!PlayerSettings.virtualRealitySupported || !headTarget.humanoid.steam.enabled)
                {
                    return;
                }
#elif hOPENVR
                if (!PlayerSettings.virtualRealitySupported || !headTarget.humanoid.openVR.enabled)
                {
                    return;
                }
#endif

                CheckSensorComponent(headTarget);

                enabledProp.boolValue = Target_Editor.ControllerInspector(sensor, headTarget);
                sensor.enabled        = enabledProp.boolValue;
                sensor.CheckSensorTransform();
                if (!Application.isPlaying)
                {
                    sensor.SetSensor2Target();
                    sensor.ShowSensor(headTarget.humanoid.showRealObjects && headTarget.showRealObjects);
                }


                if (enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", sensor.sensorTransform, typeof(Transform), true);
                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 6
0
            public override void Inspector()
            {
                if (!headTarget.humanoid.oculus.enabled || !OculusSupported())
                {
                    return;
                }

                CheckHmdComponent(headTarget);

                enabledProp.boolValue     = Target_Editor.ControllerInspector(headTarget.oculus, headTarget);
                headTarget.oculus.enabled = enabledProp.boolValue;
                headTarget.oculus.CheckSensorTransform();
                if (!Application.isPlaying)
                {
                    headTarget.oculus.SetSensor2Target();
                    headTarget.oculus.ShowSensor(headTarget.humanoid.showRealObjects && headTarget.showRealObjects);
                }

                if (enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", headTarget.oculus.sensorTransform, typeof(Transform), true);
#if hOPTITRACK
                    if (headTarget.optitrack.enabled)
                    {
                        overrideOptitrackPositionProp.boolValue = EditorGUILayout.Toggle("Override OptiTrack Position", overrideOptitrackPositionProp.boolValue);
                    }
                    else
#endif
                    overrideOptitrackPositionProp.boolValue = true;

                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 7
0
            public override void Inspector()
            {
                if (!handTarget.humanoid.oculus.enabled || !OculusSupported())
                {
                    return;
                }

                CheckControllerComponent(handTarget);

                enabledProp.boolValue     = Target_Editor.ControllerInspector(handTarget.oculus, handTarget);
                handTarget.oculus.enabled = enabledProp.boolValue;
                handTarget.oculus.CheckSensorTransform();
                if (!Application.isPlaying)
                {
                    handTarget.oculus.SetSensor2Target();
                    handTarget.oculus.ShowSensor(handTarget.humanoid.showRealObjects && handTarget.showRealObjects);
                }

                if (enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", handTarget.oculus.sensorTransform, typeof(Transform), true);
                    //#if UNITY_ANDROID
                    //                    controllerTypeProp.intValue = (int)(OculusHand.ControllerType)EditorGUILayout.EnumPopup("Controller Type", (OculusHand.ControllerType)controllerTypeProp.intValue);
                    //#endif
                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 8
0
            public override void Inspector()
            {
                if (!headTarget.humanoid.pupil.enabled)
                {
                    return;
                }

                enabledProp.boolValue = Target_Editor.ControllerInspector(sensor, headTarget);
                if (enabledProp.boolValue && !headTarget.unityVRHead.enabled)
                {
                    EditorGUILayout.HelpBox("Pupil eye tracking requires a First Person Camera", MessageType.Error);
                }
            }
Ejemplo n.º 9
0
            public override void Inspector()
            {
#if hSTEAMVR
                if (!PlayerSettings.virtualRealitySupported || !handTarget.humanoid.steam.enabled)
                {
                    return;
                }
#elif hOPENVR
                if (!PlayerSettings.virtualRealitySupported || !handTarget.humanoid.openVR.enabled)
                {
                    return;
                }
#endif
                CheckSensorComponent(handTarget);

                enabledProp.boolValue = Target_Editor.ControllerInspector(sensor, handTarget);
                sensor.enabled        = enabledProp.boolValue;
                sensor.CheckSensorTransform();
                if (!Application.isPlaying)
                {
                    sensor.SetSensor2Target();
                    sensor.ShowSensor(handTarget.humanoid.showRealObjects && handTarget.showRealObjects);
                }


                if (enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", sensor.sensorTransform, typeof(Transform), true);
                    attachedBoneProp.intValue = (int)(ArmBones)EditorGUILayout.EnumPopup("Bone", (ArmBones)attachedBoneProp.intValue);
#if hSTEAMVR
                    if ((ArmBones)attachedBoneProp.intValue == ArmBones.Hand && handTarget.steamVR.enabled)
                    {
                        EditorGUILayout.HelpBox("SteamVR Controller and Vive Tracker are both on the hand", MessageType.Warning);
                    }
#elif hOPENVR
                    if ((ArmBones)attachedBoneProp.intValue == ArmBones.Hand && handTarget.openVR.enabled)
                    {
                        EditorGUILayout.HelpBox("OpenVR Controller and Vive Tracker are both on the hand", MessageType.Warning);
                    }
#endif
                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 10
0
            public override void Inspector()
            {
                if (!headTarget.humanoid.optitrack.enabled)
                {
                    return;
                }

                CheckRigidbodyComponent(headTarget);

                enabledProp.boolValue = Target_Editor.ControllerInspector(sensor, headTarget);
                sensor.enabled        = enabledProp.boolValue;
                sensor.CheckSensorTransform();

                if (enabledProp.boolValue && (headTarget.humanoid.optitrack.trackingType == OptiTracker.TrackingType.Rigidbody))
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Sensor Transform", sensor.sensorTransform, typeof(Transform), true);
                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 11
0
            public override void Inspector()
            {
                if (!headTarget.humanoid.vrtk.enabled)
                {
                    return;
                }

                enabledProp.boolValue   = Target_Editor.ControllerInspector(headTarget.vrtk, headTarget);
                headTarget.vrtk.enabled = enabledProp.boolValue;
                headTarget.vrtk.CheckSensorTransform();
                if (!Application.isPlaying)
                {
                    headTarget.vrtk.ShowSensor(headTarget.humanoid.showRealObjects && headTarget.showRealObjects);
                }

                if (Application.isPlaying && enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", headTarget.vrtk.sensorTransform, typeof(Transform), true);
                    EditorGUI.indentLevel--;
                }
            }
            public override void Inspector()
            {
                if (!PlayerSettings.virtualRealitySupported || !handTarget.humanoid.mixedReality.enabled)
                {
                    return;
                }

                enabledProp.boolValue           = Target_Editor.ControllerInspector(handTarget.mixedReality, handTarget);
                handTarget.mixedReality.enabled = enabledProp.boolValue;
                handTarget.mixedReality.CheckSensorTransform();
                if (!Application.isPlaying)
                {
                    handTarget.mixedReality.ShowSensor(handTarget.humanoid.showRealObjects && handTarget.showRealObjects);
                }

                if (enabledProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    sensorTransformProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Tracker Transform", handTarget.mixedReality.sensorTransform, typeof(Transform), true);
                    EditorGUI.indentLevel--;
                }
            }
Ejemplo n.º 13
0
            public override void Inspector()
            {
                if (headTarget.humanoid.kinectTracker.enabled)
                {
                    enabledProp.boolValue = Target_Editor.ControllerInspector(sensor, headTarget);
                    if (enabledProp.boolValue)
                    {
                        EditorGUI.indentLevel++;
                        EditorGUILayout.BeginHorizontal();
                        headTarget.kinect.headTracking = EditorGUILayout.ToggleLeft("Head Tracking", headTarget.kinect.headTracking, GUILayout.MinWidth(80));
                        if (headTarget.kinect.headTracking)
                        {
                            headTarget.kinect.rotationTrackingAxis = (Kinect2Head.RotationTrackingAxis)EditorGUILayout.EnumPopup(headTarget.kinect.rotationTrackingAxis);
                        }
                        EditorGUILayout.EndHorizontal();
#if hFACE
                        headTarget.kinectFace.faceTracking = EditorGUILayout.ToggleLeft("Face Tracking", headTarget.kinectFace.faceTracking);
                        headTarget.kinectFace.audioInput   = EditorGUILayout.ToggleLeft("Audio Input", headTarget.kinectFace.audioInput);
#endif
                        EditorGUI.indentLevel--;
                    }
                }
            }