fix: SetParticleSystemInstance/Prefab APIs destroy generated objects

mob-sakai 2024-06-26 17:17:38 +09:00
parent b068238e0a
commit 0a67cc99bc
1 changed files with 2 additions and 0 deletions

View File

@ -481,6 +481,8 @@ namespace Coffee.UIExtensions
for (var i = 0; i < childCount; i++)
{
var go = transform.GetChild(i).gameObject;
if (go.TryGetComponent<Camera>(out var cam) && cam == _bakeCamera) continue;
if (go.TryGetComponent<UIParticleRenderer>(out var _)) continue;
go.SetActive(false);
if (destroyOldParticles)
{