diff --git a/Assets/Scripts/Units/SettingValue.cs b/Assets/Scripts/Units/SettingValue.cs index ebf93cb..50a0ff1 100644 --- a/Assets/Scripts/Units/SettingValue.cs +++ b/Assets/Scripts/Units/SettingValue.cs @@ -22,8 +22,16 @@ public class SettingValue : IResettableSettingValue{ public T Value{ get => currentValue; - set => targetValue = value; + set{ + if (IsSmoothable()) { + targetValue = value; + } else { + currentValue = value; + targetValue = value; + } + } } + [HorizontalGroup("Settings"), VerticalGroup("Settings/Smoothing"), BoxGroup("Settings/Smoothing/Smoothing"), LabelText("Current"), ShowIf("@IsSmoothable()")] public float currentSmoothing; [HorizontalGroup("Settings"), VerticalGroup("Settings/Value"), BoxGroup("Settings/Value/Value"), LabelText("Default")]