This commit is contained in:
mob-sakai
2022-06-11 22:32:14 +09:00
parent 7b21c500ef
commit 01459b06b8
4 changed files with 33 additions and 21 deletions

View File

@@ -10,6 +10,14 @@ namespace Coffee.UIExtensions
static readonly List<UIParticle> s_ActiveParticles = new List<UIParticle>();
private static int frameCount = 0;
public static int uiParticleCount
{
get
{
return s_ActiveParticles.Count;
}
}
public static void Register(UIParticle particle)
{
if (!particle) return;
@@ -41,16 +49,17 @@ namespace Coffee.UIExtensions
Profiler.BeginSample("[UIParticle] Refresh");
for (var i = 0; i < s_ActiveParticles.Count; i++)
{
var uip = s_ActiveParticles[i];
try
{
s_ActiveParticles[i].UpdateRenderers();
uip.UpdateTransformScale();
uip.UpdateRenderers();
}
catch (Exception e)
{
Debug.LogException(e);
}
}
Profiler.EndSample();
}
}