Restore Defaults button to restore the default settings.

This commit is contained in:
2026-02-03 22:56:01 +02:00
parent 2e7dc403ad
commit 011d9dfdda
9 changed files with 264 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
using UnityEngine;
public class SliderToVCA : MonoBehaviour
public class SliderToVCA : AbstractValueController
{
public enum VCATarget
{
@@ -20,12 +20,16 @@ public class SliderToVCA : MonoBehaviour
slider.OnValueChanged += ApplyVolume;
}
private void Start()
{
RestoreFromConfig();
}
override public void RestoreFromConfig()
{
float initialValue = GetInitialValue();
slider.SetHandleValue(initialValue);
}
private float GetInitialValue()
{
switch (target)