Skip to content

TweenColor

mrlinds edited this page Sep 28, 2018 · 3 revisions

About

All tween classes use the same set of common settings.

See page : Common Settings

TweenColor should be able to tween the color of just about anything that has a 'color' value assigned to it. It currently supports

  • Sprites
  • Images
  • ParticleSystems
  • Renderers (Materials)
  • Lights
  • TextMesh
  • Canvas (alpha only)
  • TextMeshPro UI ( and all MaskableGraphic extended classes)

Parameters

Use Material

Try and use a Material parameter. Some objects like Sprites could be set by color parameter or by renderer material, so user must specify when wanting to target a material

Material Property

Name of material property of type Color You can see what these are by selecting the shader targeted material is using, althoug the typical use case is to target the parameter by name of _Color

Don't Instance Material

Script will typically create and assign a new instance of a material to tween. Select this if this is not desired behaviour. If you've set multiple 'TweenColor' components on an object, you will only want the first Component to do this instancing.

Force Set Material

Script typically sets color on 'renderer.sharedMaterial' Select this if you want to force the script to set referenced 'material' instead This is especially used if setting some things up by script

Color Over Time

Set the Color Values to use in Interpolation. This is a typical Unity Color Gradient

Color Funtion

Means in which to apply specified Color Many modes are dependent on Initial color

Color Over Time Multiplier

Since Unity's Color Gradient doesn't at this point support HDR colors, this value will multiply the Color Over Time values

Lindsay Jorgensen lindsay (at) radialgames (dot) com or twitter @mrlinds

Clone this wiki locally