// ...

                void LateUpdate()
                {
                    if (particleCountText)
                    {
                        // Update particle count display.

                        particleCountText.text  = "PARTICLE COUNT: ";
                        particleCountText.text += list.GetParticleCount().ToString();
                    }
                }
Пример #2
0
                // ...

                void LateUpdate()
                {
                    // Update particle count display.

                    particleCountText.text = "PARTICLE COUNT: ";

                    if (particleMode == ParticleMode.looping)
                    {
                        particleCountText.text += loopingParticleSystems.GetParticleCount().ToString();
                    }
                    else if (particleMode == ParticleMode.oneshot)
                    {
                        particleCountText.text += oneshotParticleSystems.GetParticleCount().ToString();
                    }
                }