Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development How to Make a Video Game Pickups Add Pickup Particles

alexvalladares
alexvalladares
21,478 Points

Another way to void particles to repeat forever.

You can also disable the "Looping" check in the FlyParticles inspector and the particles appears just once. The con is the instance is not deleted and I suppose that the most particles you get, the lower the game runs if you do not destroy them, so I think it's a best practice the Nick's way.

1 Answer

Yes absolutely, you don't want to end up with a case in continuously increasing instances that aren't even used. Especially with particle systems that can be CPU heavy. But the method you mentioned will have a use for other circumstances (when a particle system is to be triggered on and off, maybe a rain effect or some instances of fire) and it's always great to be aware of different ways of doing things for when you come to a problem and you're ready with the solution :)