Skip to content

Commit

Permalink
fix: compile error in 2018.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Oct 28, 2020
1 parent af5f7e9 commit 82f81ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Scripts/UIParticleUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ private static void BakeMesh(UIParticle particle)
Profiler.EndSample();
}

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

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

0 comments on commit 82f81ef

Please sign in to comment.