public override void OnInspectorGUI() { serializedObject.Update(); GUIHelper.ShowInputValueNote(); EditorGUILayout.PropertyField(_inputCurve); EditorGUILayout.PropertyField(_modulationType, _textModulation); if (_modulationType.hasMultipleDifferentValues || _modulationType.enumValueIndex != 0) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_modulationCurve, _textCurve); EditorGUI.indentLevel--; } EditorGUILayout.PropertyField(_outputType); var showAllTypes = _outputType.hasMultipleDifferentValues; var type = (ValueRemapper.OutputType)_outputType.enumValueIndex; if (showAllTypes || type == ValueRemapper.OutputType.Bool) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_threshold); EditorGUI.indentLevel--; EditorGUILayout.PropertyField(_boolEvent); } if (showAllTypes || type == ValueRemapper.OutputType.Int) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_intOutput0, _textOutput0); EditorGUILayout.PropertyField(_intOutput1, _textOutput1); EditorGUI.indentLevel--; EditorGUILayout.PropertyField(_intEvent); } if (showAllTypes || type == ValueRemapper.OutputType.Float) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_floatOutput0, _textOutput0); EditorGUILayout.PropertyField(_floatOutput1, _textOutput1); EditorGUI.indentLevel--; EditorGUILayout.PropertyField(_floatEvent); } if (showAllTypes || type == ValueRemapper.OutputType.Vector3) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_vector3Output0, _textOutput0); EditorGUILayout.PropertyField(_vector3Output1, _textOutput1); EditorGUI.indentLevel--; EditorGUILayout.PropertyField(_vector3Event); } serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); GUIHelper.ShowInputValueNote(); EditorGUILayout.PropertyField(_threshold); EditorGUILayout.PropertyField(_delayToOff); EditorGUILayout.PropertyField(_onEvent); EditorGUILayout.PropertyField(_offEvent); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); GUIHelper.ShowInputValueNote(); EditorGUILayout.PropertyField(_targetTransform); EditorGUILayout.PropertyField(_translationMode, _textTranslation); EditorGUI.indentLevel++; if (_translationMode.hasMultipleDifferentValues || _translationMode.enumValueIndex == (int)ConstantMotion.TranslationMode.Vector) { EditorGUILayout.PropertyField(_translationVector, GUIContent.none); } if (_translationMode.hasMultipleDifferentValues || _translationMode.enumValueIndex != 0) { EditorGUILayout.PropertyField(_translationAmount0, _textAmount0); EditorGUILayout.PropertyField(_translationAmount1, _textAmount1); } EditorGUI.indentLevel--; EditorGUILayout.PropertyField(_rotationMode, _textRotation); EditorGUI.indentLevel++; if (_rotationMode.hasMultipleDifferentValues || _rotationMode.enumValueIndex == (int)ConstantMotion.RotationMode.Vector) { EditorGUILayout.PropertyField(_rotationAxis, GUIContent.none); } if (_rotationMode.hasMultipleDifferentValues || _rotationMode.enumValueIndex != 0) { EditorGUILayout.PropertyField(_rotationAngle0, _textAngle0); EditorGUILayout.PropertyField(_rotationAngle1, _textAngle1); } EditorGUI.indentLevel--; EditorGUILayout.PropertyField(_addToOriginal); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); GUIHelper.ShowInputValueNote(); EditorGUILayout.PropertyField(_colorMode); if (_colorMode.hasMultipleDifferentValues || _colorMode.enumValueIndex == (int)ColorMapper.ColorMode.Gradient) { EditorGUILayout.PropertyField(_gradient); } if (_colorMode.hasMultipleDifferentValues || _colorMode.enumValueIndex == (int)ColorMapper.ColorMode.ColorArray) { DrawColorArray(); } EditorGUILayout.PropertyField(_colorEvent); serializedObject.ApplyModifiedProperties(); }