diff options
Diffstat (limited to 'GameCode/DisableChildren.cs')
-rw-r--r-- | GameCode/DisableChildren.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/GameCode/DisableChildren.cs b/GameCode/DisableChildren.cs new file mode 100644 index 0000000..e51223c --- /dev/null +++ b/GameCode/DisableChildren.cs @@ -0,0 +1,13 @@ +using UnityEngine; + +public class DisableChildren : MonoBehaviour +{ + private void Start() + { + ParticleSystem[] componentsInChildren = GetComponentsInChildren<ParticleSystem>(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + componentsInChildren[i].gameObject.SetActive(value: false); + } + } +} |