Skip to content

Commit

Permalink
fix: the effect is kept even if the component is disabled (UIFlip, UI…
Browse files Browse the repository at this point in the history
…Gradient)
  • Loading branch information
mob-sakai committed Apr 10, 2020
1 parent 4c08c8c commit 6124214
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Assets/Coffee/UIExtensions/UIEffect/Scripts/UIFlip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public bool vertical
/// <param name="vh">VertexHelper.</param>
public override void ModifyMesh(VertexHelper vh)
{
if (!isActiveAndEnabled) return;

var vt = default(UIVertex);
for (var i = 0; i < vh.currentVertCount; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/Coffee/UIExtensions/UIEffect/Scripts/UIGradient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public bool ignoreAspectRatio
/// </summary>
public override void ModifyMesh(VertexHelper vh)
{
if (!IsActive())
if (!isActiveAndEnabled)
return;

// Gradient space.
Expand Down

0 comments on commit 6124214

Please sign in to comment.