fix: SetParticleSystemInstance/Prefab APIs destroy generated objects
parent
624d73d610
commit
4b30c16b9a
|
@ -481,6 +481,8 @@ namespace Coffee.UIExtensions
|
||||||
for (var i = 0; i < childCount; i++)
|
for (var i = 0; i < childCount; i++)
|
||||||
{
|
{
|
||||||
var go = transform.GetChild(i).gameObject;
|
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);
|
go.SetActive(false);
|
||||||
if (destroyOldParticles)
|
if (destroyOldParticles)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue