using System; [Serializable] public struct SettingValue{ public T value; public float smoothing; // Smoothing changes how fast value is changed. public float easing; // Easing changes how fast smoothing is changed, when given a new value. public float currentSmoothing; // Actively eased and accessed value public float currentValue; // Actively smoothed and accessed value public T refVel; // For use with SmoothDamp public SettingValue(T initValue, float defaultEasing = 2f, float defaultSmoothing = 1f){ value = initValue; easing = defaultEasing; value = default; smoothing = defaultSmoothing; currentSmoothing = 0; currentValue = 0; refVel = default; } }