Best practices for spawning particle systems / emitters

In this lecture I guess I was expecting (given that the term “emitter” was used) that we’d spawn a particle system and then trigger its effect to start whenever the gun fire method was called. Instead it seems that we create the particle system on each firing of the gun. I assume that once the system is finished its effect, it is garbage collected but it also seems a bit wasteful to continually create new ones on every firing.

Is there a way to just create it once and then trigger it? If so, is there an advantage to one or the other method?

How would that work for spawning multiple times? What’s done in the course is how it’s meant to be used. If you get the Shooter Game epic provides you’ll see it does the same.

DanM brings a good point about the concurrent uses.

If performance was an issue when spawning multiple times the same asset, one can look at the pooling technique. Here it seems overkill though.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms