fix: inactive ParticleSystems are removed from the list on refresh

This commit is contained in:
mob-sakai
2023-08-17 17:48:48 +09:00
parent 2fe0bde422
commit 4851a1880e
4 changed files with 41 additions and 5 deletions

View File

@@ -394,8 +394,8 @@ namespace Coffee.UIExtensions
private void RefreshParticles(GameObject root)
{
if (!root) return;
root.GetComponentsInChildren(particles);
particles.RemoveAll(x => x.GetComponentInParent<UIParticle>() != this);
root.GetComponentsInChildren(true, particles);
particles.RemoveAll(x => x.GetComponentInParent<UIParticle>(true) != this);
for (var i = 0; i < particles.Count; i++)
{