public override void OnInspectorGUI() { EditorTools.PropertyField(pointerTransform); EditorTools.PropertyField(grabDistance); EditorTools.PropertyField(grabRadius); EditorTools.PropertyField(checkForObstruction); EditorTools.PropertyField(guideLineAlwaysVisible); if (!guideLineAlwaysVisible.boolValue) { EditorTools.PropertyField(canTriggerLineRender); if (canTriggerLineRender.boolValue) { EditorTools.PropertyField(lineTriggerInput); } } else { canTriggerLineRender.boolValue = false; } EditorTools.PropertyField(lineRender); EditorTools.PropertyField(layerMask); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { if (currentSDK == null) { return; } EditorTools.PropertyField(currentSDK); EditorTools.PropertyField(leftController); EditorTools.PropertyField(rightController); EditorGUILayout.PropertyField(gestureConfig, true); serializedObject.ApplyModifiedProperties(); if ((int)targetScript.CurrentSDK != startSDKIndex) { if (GUILayout.Button("Update SDK")) { UpdateDefinitions(targetScript.CurrentSDK); } } #if SDK_STEAM_VR if (GUILayout.Button("Create Input Bindings")) { if (EditorUtility.DisplayDialog("Create Input Bindings", "Are you sure you want to overwrite your current SteamVR Input Bindings", "Overwrite", "Cancel")) { CreateSteamVRInputBindings(); } } #endif }
public override void OnInspectorGUI() { EditorTools.PropertyField(dropZoneMode); EditorTools.PropertyField(dropPoint); EditorTools.PropertyField(startingDrop); if ((DropZoneMode)dropZoneMode.enumValueIndex == DropZoneMode.Collider) { EditorTools.PropertyField(dropZoneColliderArray, true); } else { EditorTools.PropertyField(dropRadius); } EditorTools.PropertyField(shouldFly); if (shouldFly.boolValue) { EditorTools.PropertyField(flyTime); } EditorTools.PropertyField(syncronizePosition); EditorTools.PropertyField(syncronizeRot); EditorTools.PropertyField(usePreview); EditorTools.PropertyField(canStack); EditorTools.PropertyField(disableCollidersOnDrop); EditorTools.PropertyField(onDropStateChange); serializedObject.ApplyModifiedProperties(); base.OnInspectorGUI(); }
public override void OnInspectorGUI() { EditorTools.PropertyField(grabDistance); EditorTools.PropertyField(usePerHandSettings); if (usePerHandSettings.boolValue) { EditorGUILayout.PropertyField(rightHandSettings, true); EditorGUILayout.PropertyField(leftHandSettings, true); } else { EditorGUILayout.PropertyField(handSettings, true); } EditorTools.PropertyField(grabButton); EditorTools.PropertyField(transformBase); EditorTools.PropertyField(solverIterations); EditorTools.PropertyField(shouldBackToStartingPosition); EditorTools.PropertyField(backForce); grabLayer.intValue = EditorGUILayout.LayerField("Grab Layer", grabLayer.intValue); unGrabLayer.intValue = EditorGUILayout.LayerField("UnGrab Layer", unGrabLayer.intValue); EditorTools.PropertyField(onValueChange); EditorTools.PropertyField(onGrabStateChange); //layer = EditorGUILayout.LayerField(layer); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { EditorTools.PropertyField(grabMode); EditorTools.PropertyField(slideAxis); EditorTools.PropertyField(grabDistance); EditorTools.PropertyField(usePerHandSettings); if (usePerHandSettings.boolValue) { EditorGUILayout.PropertyField(rightHandSettings, true); EditorGUILayout.PropertyField(leftHandSettings, true); } else { EditorGUILayout.PropertyField(handSettings, true); } 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(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(); }
private void DrawUIReloadSettings() { EditorTools.PropertyField(clipSize); EditorTools.PropertyField(reloadTime); if (clipSize.intValue <= 0) { clipSize.intValue = 1; } if (reloadTime.floatValue < 0.0f) { clipSize.floatValue = 0.001f; } }
public override void OnInspectorGUI() { EditorTools.PropertyField(grabbable); EditorTools.PropertyField(interactDistance); EditorTools.PropertyField(usePerHandSettings); if (usePerHandSettings.boolValue) { EditorGUILayout.PropertyField(rightHandSettings, true); EditorGUILayout.PropertyField(leftHandSettings, true); } else { EditorGUILayout.PropertyField(handSettings, true); } EditorTools.PropertyField(interactButton); serializedObject.ApplyModifiedProperties(); }
private void DrawRealisticReloadSettings() { EditorTools.PropertyField(magazineDropZone); }
public override void OnInspectorGUI() { EditorTools.PropertyField(reloadMode); if ((ReloadMode)reloadMode.enumValueIndex != ReloadMode.InfiniteBullets) { EditorTools.DrawTittle("Reload Settings"); } if ((ReloadMode)reloadMode.enumValueIndex == ReloadMode.Realistic) { DrawRealisticReloadSettings(); } else if ((ReloadMode)reloadMode.enumValueIndex == ReloadMode.UI) { DrawUIReloadSettings(); } if ((ReloadMode)reloadMode.enumValueIndex != ReloadMode.InfiniteBullets) { EditorTools.PropertyField(weaponUI); } if ((ReloadMode)reloadMode.enumValueIndex == ReloadMode.Physics) { EditorTools.PropertyField(barrelScript); EditorTools.PropertyField(reloadAngle); } if ((ReloadMode)reloadMode.enumValueIndex == ReloadMode.PumpActionInfiniteBullets || (ReloadMode)reloadMode.enumValueIndex == ReloadMode.PumpActionRealistic) { EditorTools.PropertyField(slider); } if ((ReloadMode)reloadMode.enumValueIndex == ReloadMode.PumpActionRealistic) { EditorTools.PropertyField(clipSize); EditorTools.PropertyField(bulletInsertPoint); } if ((ReloadMode)reloadMode.enumValueIndex == ReloadMode.Launcher) { EditorTools.PropertyField(bulletInsertPoint); } EditorTools.DrawTittle("Shooting Settings"); EditorTools.PropertyField(shootPoint); if ((ReloadMode)reloadMode.enumValueIndex != ReloadMode.Launcher) { EditorTools.PropertyField(bulletPrefab); } EditorTools.PropertyField(hitEffect); EditorTools.PropertyField(weaponHammer); EditorTools.PropertyField(shellEjector); EditorTools.PropertyField(shootRate); EditorTools.PropertyField(isAutomatic); if (shootRate.floatValue <= 0.0f) { shootRate.floatValue = 0.001f; } //rpm EditorGUILayout.LabelField(60.0f / shootRate.floatValue + " RPM"); EditorTools.PropertyField(bulletSpeed); EditorTools.PropertyField(dmg); EditorTools.PropertyField(hitLayer); EditorTools.PropertyField(maxBulletBounceCount); EditorTools.DrawTittle("Hit Force"); EditorTools.MinMaxFloatSlider(minHitForce, maxHitForce, MIN_HIT_FORCE, MAX_HIT_FORCE); EditorTools.PropertyField(range); EditorTools.PropertyField(shootSound); EditorTools.PropertyField(muzzleFlash); EditorTools.PropertyField(parentMuzzleFlash); EditorTools.PropertyField(disableMuzzleWhileNoShooting); EditorTools.PropertyField(muzzleLiveTime); EditorTools.PropertyField(fireButton); EditorTools.DrawTittle("Recoil Position Settings"); EditorTools.MinMaxFloatSlider(minRecoilPositionForce, maxRecoilPositionForce, MIN_POSITION_FORCE, MAX_POSITION_FORCE); EditorTools.PropertyField(recoilPositionLimit); EditorTools.DrawTittle("Recoil Rotation Settings"); EditorTools.MinMaxFloatSlider(minRecoilRotationForce, maxRecoilRotationForce, MIN_ROTATION_FORCE, MAX_ROTATION_FORCE); EditorTools.PropertyField(recoilAngleLimit); EditorTools.PropertyField(useSpread); if (useSpread.boolValue) { EditorTools.PropertyField(minSpreadCount); EditorTools.PropertyField(maxSpreadCount); EditorTools.PropertyField(minSpreadAngle); EditorTools.PropertyField(maxSpreadAngle); } EditorTools.PropertyField(positionLerpSpeed); EditorTools.PropertyField(rotationLerpSpeed); serializedObject.ApplyModifiedProperties(); }
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(); }