public override void OnInspectorGUI() { serializedObject.Update(); PsyiaForce myTarget = (PsyiaForce)target; EditorGUILayout.PropertyField(ShapeProperty, new GUIContent("Force Shape")); EditorGUILayout.PropertyField(StrengthProperty, new GUIContent("Force Strength (N)")); EditorGUILayout.PropertyField(StrengthMultiplierProperty, new GUIContent("Force Multiplier")); EditorGUILayout.PropertyField(AttenuationProperty, new GUIContent("Attenuation Mode")); if (AttenuationProperty.enumValueIndex == 4) { EditorGUILayout.PropertyField(DistanceProperty, new GUIContent("Attenuation Period")); } else if (AttenuationProperty.enumValueIndex > 4) { EditorGUILayout.PropertyField(DistanceProperty, new GUIContent("Attenuation Softening Distance")); } else if (AttenuationProperty.enumValueIndex != 0) { EditorGUILayout.PropertyField(DistanceProperty, new GUIContent("Attenuation Distance")); } serializedObject.ApplyModifiedProperties(); }
public void RemoveSource(PsyiaForce NewSource) { if (!Sources.Contains(NewSource)) { return; } Sources.Remove(NewSource); UpdateCount(); }
public void AddSource(PsyiaForce NewSource) { if (Sources.Contains(NewSource)) { return; } Sources.Add(NewSource); UpdateCount(); }