fixed: non-smoothed values now have their values applied properly (instantly, when set)
This commit is contained in:
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user