fix: remove unnecessary per-frame allocation.

pull/289/head
Jake O'Connor 2023-04-27 16:17:24 -07:00 committed by mob-sakai
parent a4bcf93022
commit e92b514624
1 changed files with 6 additions and 2 deletions

View File

@ -323,9 +323,13 @@ namespace Coffee.UIExtensions
{
if (!isActiveAndEnabled) return;
if (m_Renderers.Any(x => !x))
foreach (var rend in m_Renderers)
{
RefreshParticles(particles);
if (!rend)
{
RefreshParticles(particles);
break;
}
}
var bakeCamera = GetBakeCamera();