mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-19 17:22:37 +08:00
fix: gradient color is not updated when calling the SetGradientKeys method
This commit is contained in:
@@ -952,11 +952,14 @@ namespace Coffee.UIEffects
|
||||
/// <summary>
|
||||
/// Set gradation gradient's keys.
|
||||
/// </summary>
|
||||
public void SetGradientKeys(GradientColorKey[] colorKeys, GradientAlphaKey[] alphaKeys)
|
||||
public void SetGradientKeys(GradientColorKey[] colorKeys, GradientAlphaKey[] alphaKeys,
|
||||
GradientMode mode = GradientMode.Blend)
|
||||
{
|
||||
m_GradationGradient ??= new Gradient();
|
||||
m_GradationGradient.SetKeys(colorKeys, alphaKeys);
|
||||
m_GradationGradient.mode = mode;
|
||||
context?.SetGradationDirty();
|
||||
SetVerticesDirty();
|
||||
}
|
||||
|
||||
protected override void UpdateContext(UIEffectContext c)
|
||||
|
||||
Reference in New Issue
Block a user