parent
65da5d35f5
commit
f73a6777c4
|
@ -328,7 +328,8 @@ namespace Coffee.UIExtensions
|
||||||
|
|
||||||
// Bake mesh.
|
// Bake mesh.
|
||||||
Profiler.BeginSample("[UIParticleRenderer] Bake Mesh");
|
Profiler.BeginSample("[UIParticleRenderer] Bake Mesh");
|
||||||
if (_isTrail && _parent.canSimulate && 0 < s_CombineInstances[0].mesh.vertexCount)
|
s_CombineInstances[0].mesh.Clear(false);
|
||||||
|
if (_isTrail && _parent.canSimulate && 0 < _particleSystem.particleCount)
|
||||||
{
|
{
|
||||||
#if PS_BAKE_API_V2
|
#if PS_BAKE_API_V2
|
||||||
_renderer.BakeTrailsMesh(s_CombineInstances[0].mesh, bakeCamera,
|
_renderer.BakeTrailsMesh(s_CombineInstances[0].mesh, bakeCamera,
|
||||||
|
@ -337,7 +338,7 @@ namespace Coffee.UIExtensions
|
||||||
_renderer.BakeTrailsMesh(s_CombineInstances[0].mesh, bakeCamera, true);
|
_renderer.BakeTrailsMesh(s_CombineInstances[0].mesh, bakeCamera, true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (_renderer.CanBakeMesh())
|
else if (!_isTrail && _renderer.CanBakeMesh())
|
||||||
{
|
{
|
||||||
_particleSystem.ValidateShape();
|
_particleSystem.ValidateShape();
|
||||||
#if PS_BAKE_API_V2
|
#if PS_BAKE_API_V2
|
||||||
|
@ -347,10 +348,6 @@ namespace Coffee.UIExtensions
|
||||||
_renderer.BakeMesh(s_CombineInstances[0].mesh, bakeCamera, true);
|
_renderer.BakeMesh(s_CombineInstances[0].mesh, bakeCamera, true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
s_CombineInstances[0].mesh.Clear(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Too many vertices to render.
|
// Too many vertices to render.
|
||||||
if (65535 <= s_CombineInstances[0].mesh.vertexCount)
|
if (65535 <= s_CombineInstances[0].mesh.vertexCount)
|
||||||
|
|
Loading…
Reference in New Issue