public static TweenerCore <Color, Color, ColorOptions> DOColor(this SerializedPass target, int propertyId, Color endValue, float duration) { var tweener = DOTween.To(() => target.GetColor(propertyId), x => target.SetColor(propertyId, x), endValue, duration); tweener.SetOptions(false).SetTarget(target); return(tweener); }
public static TweenerCore <Color, Color, ColorOptions> DOFade(this SerializedPass target, string propertyName, float endValue, float duration) { var tweener = DOTween.ToAlpha(() => target.GetColor(propertyName), x => target.SetColor(propertyName, x), endValue, duration); tweener.SetOptions(true).SetTarget(target); return(tweener); }