You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
fix: SetParticleSystemInstance/Prefab APIs destroy generated objects
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user