fixed: non-smoothed values now have their values applied properly (instantly, when set)

This commit is contained in:
Chris
2025-12-03 17:54:45 -05:00
parent 14ea2c64dc
commit 3525f5fc47

View File

@@ -22,8 +22,16 @@ public class SettingValue<T> : 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")]