fix: crash occurs when too many vertices are rendered
parent
52f2ef1f24
commit
723a04d0cf
|
@ -276,6 +276,19 @@ namespace Coffee.UIExtensions
|
||||||
{
|
{
|
||||||
s_CombineInstances[0].mesh.Clear(false);
|
s_CombineInstances[0].mesh.Clear(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Too many vertices to render.
|
||||||
|
if (65535 <= s_CombineInstances[0].mesh.vertexCount)
|
||||||
|
{
|
||||||
|
s_CombineInstances[0].mesh.Clear(false);
|
||||||
|
UnityEngine.Debug.LogErrorFormat(this,
|
||||||
|
"Too many vertices to render. index={0}, isTrail={1}, vertexCount={2}(>=65535)",
|
||||||
|
_index,
|
||||||
|
_isTrail,
|
||||||
|
s_CombineInstances[0].mesh.vertexCount
|
||||||
|
);
|
||||||
|
s_CombineInstances[0].mesh.Clear(false);
|
||||||
|
}
|
||||||
Profiler.EndSample();
|
Profiler.EndSample();
|
||||||
|
|
||||||
// Combine mesh to transform. ([ParticleSystem local ->] world -> renderer local)
|
// Combine mesh to transform. ([ParticleSystem local ->] world -> renderer local)
|
||||||
|
|
Loading…
Reference in New Issue