- Home /
Particle System Overhead
I've been profiling my game in the new iPad and noticed I got a large overhead on the cpu player stat. I then profile it using the editor profiler attached to the iOS player and there seems to be a lot of processing going on ParticleSystem.Update, I'm not constantly shooting out particles or anything so why the overhead?
Here's captures of the internal profiler and the editor profiler, both on the same scene and same spot.
I've got the same problem. I've created about 50 of particle systems (shuriken), then disabled all of them (renderer.enabled = false) and stopped them.
But anyway, ParticleSystem.Update process eats great amount of CPU power. I don't know what to do. $$anonymous$$y FPS on iPad dropped to 7 FPS. :(
What I did in my case was to disable the game objects that have the particle system components on. You can test if a particle system has any alive particles in an update loop and diable them when the alive particles reaches zero.
This is just a workaround. I'd love some official response from the Unity devs, maybe we are all doing something wrong, or maybe it's a bug. Anyway it's always good to know.
Hmm... I don't have gameobjects with particles. $$anonymous$$y particle systems are separate objects that just instantiated into the world. So, there's no solution for me yet.
Ins$$anonymous$$d of disabling the renderer, try using ParticleSystem.Pause() or Stop().
I've stopped them of course. No effect. Here's my question: http://answers.unity3d.com/questions/320283/shuriken-particles-strange-load-cpu-with-particles.html
Answer by Bunny83 · May 06, 2012 at 07:00 PM
If you use the ParticleAnimator component (responsible for moving the particles), it have to calculate the movement equatation (pos = pos + velocity) adjust the energy (livetime) for each particle and finally create / update the vertices of all particles. How many particles are there in your scene?
I'm using the new particle system which doesn't have the ParticleAnimator component per say, but I'm applying movement, fading and all that stuff to my particles. In all there's around 50 different particle effects in the scene but non of them are emitting anything at the point I'm profiling. I noticed that if I deactivate the object containing the particle effect the overhead goes down.
Answer by codestage · Aug 01, 2012 at 09:24 PM
I have similar issue with Shuriken particles. I have about 200 GameObjects with ParticleSystem attached, but none of them doesn't emit particles automatically. I see high load caused by ParticleSystem.Update though. I tried to disable GameObjects and all ParticleSystem items as well, but with no result (
Answer by Arowx · Aug 07, 2015 at 06:32 PM
I think the issue is the profiler, if you look at the self ms column it is a huge percentage of the actual time spent. This indicates that the profiler is spending a lot of the total apparent time.
Maybe Unity could have an actual column where it subtracts the profilers own time from the total time in that area.
Possibly the code is complex or has to iterate a lot over all particles and particle systems.
Actually, self refers to time spent in the method itself compared to calling other methods from it. LIN$$anonymous$$
Answer by soulburner · Sep 27, 2012 at 10:04 AM
So, I've re-wrote all my particles from shuriken to legacy particles and CPU load falled to 0% when all particles are stopped.
I think it is the only solution for now.
More you can see in my question: http://answers.unity3d.com/questions/320283/shuriken-particles-strange-load-cpu-with-particles.html
Answer by gooncorp · Aug 07, 2014 at 10:31 PM
legacy are faster. the news ones have more functionality but thats just more conditions to check per cycle. if you can do it with the old system use that because its faster based on my experience.
Your answer
Follow this Question
Related Questions
Particle System(Shuriken) optimization problem 1 Answer
Inherit velocity in shuriken particle system goes haywire in build version 0 Answers
Particle Systems Not Showing Up - Windows Phone 0 Answers
Particles in Particle System rendering as white square in iOS build 1 Answer
Particle system does not re-emit until Start Lifetime elapsed 4 Answers