void Awake() { if (hasNestedEffect) { particleSys.AddRange(GetComponentsInChildren <ParticleSystem>()); nestedEffects.AddRange(GetComponentsInChildren <NoteEffect>()); //remove self nestedEffects.Remove(this); } else { particleSys.Add(GetComponent <ParticleSystem>()); } if (transform.parent) { effectParent = transform.parent.GetComponent <NoteEffect>(); } }