fix: avoid endless loop

close #392
main
mob-sakai 2025-12-24 20:10:01 +09:00
parent 1dfd756721
commit f2df47aeec
2 changed files with 2 additions and 5 deletions

View File

@ -9,6 +9,7 @@ using UnityEngine.UI;
using Random = UnityEngine.Random;
[assembly: InternalsVisibleTo("Coffee.UIParticle.Editor")]
[assembly: InternalsVisibleTo("Coffee.UIParticle.Editor.Tests")]
[assembly: InternalsVisibleTo("Coffee.UIParticle.PerformanceDemo")]
[assembly: InternalsVisibleTo("Coffee.UIParticle.Demo")]

View File

@ -13,11 +13,7 @@ namespace Coffee.UIParticleInternal
{
if (s_TmpParticles.Length < size)
{
while (s_TmpParticles.Length < size)
{
size = Mathf.NextPowerOfTwo(size);
}
size = Mathf.NextPowerOfTwo(size);
s_TmpParticles = new ParticleSystem.Particle[size];
}