Class UIGradient
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
Mesh effect that applies a color UnityEngine.Gradient to a UnityEngine.UI.Graphic, with horizontal or vertical direction, optional vertex splitting, and blend modes.
[DisallowMultipleComponent]
[AddComponentMenu("Modular UI/Gradient")]
public class UIGradient : BaseMeshEffect
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourUIBehaviourBaseMeshEffectUIGradient
Properties
BlendMode
How the computed gradient color is combined with the original vertex color.
public UIGradient.ColorBlendMode BlendMode { get; set; }
Property Value
Gradient
Gradient used to color the vertices.
public Gradient Gradient { get; set; }
Property Value
- Gradient
ModifyVertices
When true, triangles are split at gradient stops to improve color fidelity.
public bool ModifyVertices { get; set; }
Property Value
- bool
Offset
Positional offset of the gradient in normalized units [-1..1].
public float Offset { get; set; }
Property Value
- float
Scale
Zoom factor of the gradient evaluation (values > 1 zoom in).
public float Scale { get; set; }
Property Value
- float
Type
Direction of the gradient.
public UIGradient.GradientType Type { get; set; }
Property Value
Methods
ModifyMesh(Mesh)
Function that is called when the Graphic is populating the mesh.
public override void ModifyMesh(Mesh mesh)
Parameters
meshMeshThe generated mesh of the Graphic element that needs modification.
ModifyMesh(VertexHelper)
Call used to modify mesh. Place any custom mesh processing in this function.
public override void ModifyMesh(VertexHelper helper)
Parameters
helperVertexHelper