DOGradientColor Method
DOGradientColor(Material, Gradient, float)
public static Sequence DOGradientColor(this Material target, Gradient gradient, float duration)
Tweens a Material's color using the given gradient (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). Also stores the image as the tween's target so it can be used for filtered operations
Parameters
targetMaterialgradientGradientThe gradient to use
durationfloatThe duration of the tween
Returns
- Sequence
DOGradientColor(Material, Gradient, string, float)
public static Sequence DOGradientColor(this Material target, Gradient gradient, string property, float duration)
Tweens a Material's named color property using the given gradient (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). Also stores the image as the tween's target so it can be used for filtered operations
Parameters
targetMaterialgradientGradientThe gradient to use
propertystringThe name of the material property to tween (like _Tint or _SpecColor)
durationfloatThe duration of the tween
Returns
- Sequence