x


One particle pulse when gameobject is destroyed.

Hello

I have been messing around with this for some hours now, and i just cant seem to figure it out.

what i want to do is to have a single pulse of a particle system when i destroy a box.

I saw a video tutorial once which explained it but i cant find it anymore, and now im here :)

I've set up the particle system so its set to 'one shot' but how do i script it so the pulse is fired when i click the object and it is destroyed.

im using C# for this.

Thanks in advance

  • Seth
more ▼

asked Mar 10, 2011 at 12:17 PM

Kacer gravatar image

Kacer
793 46 38 58

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Put the particle system in a prefab and use Instantiate to make a copy when you destroy the object you click.

more ▼

answered Mar 10, 2011 at 05:43 PM

flaviusxvii gravatar image

flaviusxvii
5.4k 48 39 73

(comments are locked)
10|3000 characters needed characters left

check out ParticleEmitter.Emit()

we are lucky to have good documentation with unity http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter.Emit.html

more ▼

answered Mar 10, 2011 at 02:28 PM

loopyllama gravatar image

loopyllama
1.5k 2 7 26

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3628
x1232
x1028
x42
x10

asked: Mar 10, 2011 at 12:17 PM

Seen: 2224 times

Last Updated: Mar 10, 2011 at 12:17 PM