Details

Add 4 Gradients effect to your Sprite Renderer and Unity UI Canvas Image.

Add it to the Sprite Renderer or Unity UI Canvas Image GameObject via the Components menu2DxFX > Standard > 4 Gradients

4 Gradients is available in Advanced Lightning Mode. Via the Components menu2DxFX > Advanced Lightning > 4 Gradients

Note : Advanced Lightning is not working with the Unity UI Canvas (UI Canvas don't use lightning)

*without and with 2DxFX 4 Gradients


Property

Range

Default

_Alpha 0 to 1 1f
_Color1 / new Color (1f, 0f, 0f, 1f)
_Color2 / new Color (1f, 1f, 0f, 1f)
_Color3 / new Color (0f, 1f, 1f, 1f)
_Color4 / new Color (0f, 1f, 0f, 1f)

Manipulate 4 Gradients by script

Example:

// Drag and Drop your Sprite GameObject 
// with the 4 Gradients component 
// to your current script on the FX_Standard_4Gradients field 

public _2dxFX_4Gradients_Editor FX_4Gradients; 

void Update() 
{
	FX_4Gradients._Alpha =  1f;
}