Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

The question really sums it up: What is the best way to use one particle system for playing different particle effects?

The scenario: GameObject is picked up and it starts playing a simple indicator particle effect. If the GameObject is placed on a special platform it will play another particle effect.

I have very little experience with particle systems - how would you do this?

share|improve this question
add comment

2 Answers

Attach two GameObjects to one parent, each with a ParticleSystem, and just activate/deactivate them as needed.

share|improve this answer
    
Aye, this is how I have done it at the moment. Each particle effect is a prefab which is then attached to a parent. But is it possible to use just one ParticleSystem and use it for all effects? Instead of having all the possible effects as separate prefabs, it would be a lot more neat to load the wanted effect on a single ParticleSystem. –  Esa Apr 30 '13 at 10:58
1  
Well, no, not in a neat way. I guess you could somehow save all parameters of a given PArticleSystem to a file, and then load them and change everything in runtime, but that seems pretty pointless. Activating/deactivating different objects is actually a pattern that is commonly used in Unity, not just with effects but with many other things. –  Nevermind Apr 30 '13 at 12:23
add comment

It depends on a situation. If you have only two different particle systems that you want to use, Nevermind's answer with two different child object is definetly the best. However, if you want to use a lot of different particle systems (for example, if you making an RPG with a lot of spell effects), you may want to instantiate/destroy (or better, take from object pool and put back there) particular particle systems each time for each such event.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.