DoTween - how to add ease type?

Hi,

I’m unsure how I should add an ease type to my tween function?

Here’s my script:

        private void UpdatePowerbarFill(float score)
        {
            if (powerbarFillTween != null) powerbarFillTween.Kill();
            powerbarFillTween = DOVirtual.Float(powerbar_Mat.GetFloat("FillRate"), score, fillTweenDuration, (float val) => {
                powerbar_Mat.SetFloat("FillRate", val);
            }).OnComplete(() => {
                powerbarFillTween = null;
            });
        }

When looking online it seems as though I should be able to add it as an extension, but I’m getting errors when I try this:

 powerbarFillTween = DOVirtual.Float(powerbar_Mat.GetFloat("FillRate"), score, fillTweenDuration, (float val).SetEase<>(Ease.InOutElastic) => {
                powerbar_Mat.SetFloat("FillRate", val);

Does anyone know how to do this correctly?

Thanks!

I know it’s late, but just in case anyone needs it!

You can simply add the easing type after the creation of the tween:

DOVirtual.Float(0f, 1f, 0.5f, SetCanvasScale).SetEase(Ease.OutBounce);

,I hope you got it in the end, but here it is just in case anyone needs it!

DOVirtual.Float(0f, 1f, 0.5f, SetCanvasScale).SetEase(Ease.InOutBounce);