Does anyone have any advice on how to handle this? I added the jet particles for the enemies and my framerate dropped from 240 to around 45 when 6-10 enemies are on screen. Not really sure how I should handle optimization for this. Any suggestions are appreciated!
Hi Charles,
Did you use the same assets as Ben and Rick? Did you implement your own ideas?
Hi Nina,
I did use Ben and Rick’s assets. I added a few post-processing stuff for the camera but even if I remove the post-processing effects, the framerate still drops. I noticed that the framerate only drops if the ships with the thruster particles are moving. The only quick fix I did was to immediately destroy the objects once they are out of the camera’s view.
Maybe that is causing the drop in the frame rate.
Depending on how many objects are getting created and “destroyed” per frame, your computer has a lot to do. It’s a very common problem which is usually solved by object pooling. Object pooling means that you are not creating and destroying anything anymore but re-using the same objects over and over again.
See also:
- Code Project: C# Garbage Collection
- Unity Tutorial: Object Pooling
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.