Skip to content

Commit

Permalink
fix: do not bake particle system to mesh when the alpha is zero
Browse files Browse the repository at this point in the history
close #102
  • Loading branch information
mob-sakai committed Sep 28, 2020
1 parent ea33fe3 commit 1775713
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Packages/UIParticle/Scripts/UIParticleUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ private static void BakeMesh(UIParticle particle)
Profiler.EndSample();
}

// #102: Do not bake particle system to mesh when the alpha is zero.
if (Mathf.Approximately( particle.canvasRenderer.GetInheritedAlpha(), 0))
continue;

// Bake main particles.
var r = currentPs.GetComponent<ParticleSystemRenderer>();
if (CanBakeMesh(r))
Expand Down

0 comments on commit 1775713

Please sign in to comment.