public override void OnInspectorGUI() { EditorTools.PropertyField(grabMode); if ((GrabMode)grabMode.enumValueIndex == GrabMode.Joint) { EditorTools.PropertyField(setJointSettings); if (setJointSettings.boolValue) { EditorTools.PropertyField(jointBreakForce); EditorTools.PropertyField(jointBreakTorque); } } else { EditorTools.PropertyField(recoilDirection); } EditorTools.PropertyField(grabDistance); EditorTools.PropertyField(perfectGrab); EditorTools.PropertyField(usePerHandSettings); if (usePerHandSettings.boolValue) { EditorGUILayout.PropertyField(rightHandSettings, true); EditorGUILayout.PropertyField(leftHandSettings, true); } else { EditorGUILayout.PropertyField(handSettings, true); } if (!perfectGrab.boolValue) { EditorTools.PropertyField(shouldFly); } if (shouldFly.boolValue) { EditorTools.PropertyField(grabFlyTime); } if (!perfectGrab.boolValue) { EditorTools.PropertyField(autoGrab); } EditorTools.PropertyField(toggleGrab); if (autoGrab.boolValue) { int selection = startOnRightcController.boolValue ? 0 : 1; selection = GUILayout.SelectionGrid(selection, new string[] { "StartOnRightHand", "StartOnLeftController" }, 1); startOnRightcController.boolValue = selection == 0; startOnLeftController.boolValue = selection == 1; } EditorTools.PropertyField(enableCollidersOnGrab); if (!autoGrab.boolValue) { EditorTools.PropertyField(grabButton); } grabLayer.intValue = EditorGUILayout.LayerField("Grab Layer", grabLayer.intValue); unGrabLayer.intValue = EditorGUILayout.LayerField("UnGrab Layer", unGrabLayer.intValue); EditorTools.PropertyField(preserveKinematicState); EditorTools.PropertyField(useDistanceGrab); EditorTools.PropertyField(ignoreColliderList, true); #if SDK_STEAM_VR EditorTools.PropertyField(useSteamRotationOffset); #endif EditorTools.PropertyField(onGrabStateChange); if (perfectGrab.boolValue) { shouldFly.boolValue = false; } if (perfectGrab.boolValue) { autoGrab.boolValue = false; } if (!autoGrab.boolValue) { startOnLeftController.boolValue = false; startOnRightcController.boolValue = false; } //layer = EditorGUILayout.LayerField(layer); serializedObject.ApplyModifiedProperties(); //base.OnInspectorGUI(); }