Skip to content

Commit

Permalink
fix: assertion failed on expression: 'ps->array_size()'
Browse files Browse the repository at this point in the history
close #278
  • Loading branch information
mob-sakai committed May 22, 2024
1 parent ea04352 commit 1b5c359
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Packages/src/Runtime/UIParticleRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ public void UpdateMesh(Camera bakeCamera)
// Bake mesh.
Profiler.BeginSample("[UIParticleRenderer] Bake Mesh");
s_CombineInstances[0].mesh.Clear(false);

// Assertion failed on expression: 'ps->array_size()' #278
var extends = s_CombineInstances[0].mesh.bounds.extents.x;
if (!float.IsNaN(extends) && !float.IsInfinity(extends) && 0 < extends)
{
s_CombineInstances[0].mesh.RecalculateBounds();
}

if (_isTrail && _parent.canSimulate && 0 < _particleSystem.particleCount)
{
#if PS_BAKE_API_V2
Expand Down

0 comments on commit 1b5c359

Please sign in to comment.