fix: SetParticleSystemInstance/Prefab APIs destroy generated objects
parent
b068238e0a
commit
0a67cc99bc
|
@ -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