From 3525f5fc477ec0f5583a16cb2654e582f4e0e743 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 3 Dec 2025 17:54:45 -0500 Subject: [PATCH] fixed: non-smoothed values now have their values applied properly (instantly, when set) --- Assets/Scripts/Units/SettingValue.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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")]