UnityEngine.ParticleSystem.GetParticleSystems C# (CSharp) Method

GetParticleSystems() static private method

static private GetParticleSystems ( ParticleSystem root ) : UnityEngine.ParticleSystem[]
root ParticleSystem
return UnityEngine.ParticleSystem[]
        internal static ParticleSystem[] GetParticleSystems(ParticleSystem root)
        {
            if (root == null)
            {
                return null;
            }
            List<ParticleSystem> particleSystems = new List<ParticleSystem> {
                root
            };
            GetDirectParticleSystemChildrenRecursive(root.transform, particleSystems);
            return particleSystems.ToArray();
        }

Usage Example

コード例 #1
0
 public void Clear([DefaultValue("true")] bool withChildren)
 {
     if (withChildren)
     {
         ParticleSystem[] particleSystems = ParticleSystem.GetParticleSystems(this);
         ParticleSystem[] array           = particleSystems;
         for (int i = 0; i < array.Length; i++)
         {
             ParticleSystem particleSystem = array[i];
             particleSystem.Internal_Clear();
         }
     }
     else
     {
         this.Internal_Clear();
     }
 }
All Usage Examples Of UnityEngine.ParticleSystem::GetParticleSystems