You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
fix: crash occurs when too many vertices are rendered
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user