GetDirectParticleSystemChildrenRecursive() 개인적인 정적인 메소드

private static GetDirectParticleSystemChildrenRecursive ( Transform transform, List particleSystems ) : void
transform Transform
particleSystems List
리턴 void
예제 #1
0
 private static void GetDirectParticleSystemChildrenRecursive(Transform transform, List <ParticleSystem> particleSystems)
 {
     foreach (Transform transform2 in transform)
     {
         ParticleSystem component = transform2.gameObject.GetComponent <ParticleSystem>();
         if (component != null)
         {
             particleSystems.Add(component);
             ParticleSystem.GetDirectParticleSystemChildrenRecursive(transform2, particleSystems);
         }
     }
 }
예제 #2
0
        internal static ParticleSystem[] GetParticleSystems(ParticleSystem root)
        {
            if (!root)
            {
                return(null);
            }
            List <ParticleSystem> list = new List <ParticleSystem>();

            list.Add(root);
            ParticleSystem.GetDirectParticleSystemChildrenRecursive(root.transform, list);
            return(list.ToArray());
        }