- Home /
Question by
Dev Solo · Aug 15, 2012 at 08:47 PM ·
particle systemreference
How to reference a Particle System?
I normally have no problems accessing other scripts and such, but this is my first time using a particle system. I would THINK that it would be:
PartSystem = gameObject.GetComponent(ParticleSystem);
PartSystem.emit = true;
But this doesn't work. I am trying to make the system emit while a variable is true, and stop while it is not.
Edit: it gives me the error "Object not set to an instance of an object"
Comment
It is The default particle system when you go to GameObject >> Create Other >> Particle System.
Neither of those solutions seem to work.
Answer by DaveA · Aug 15, 2012 at 08:53 PM
If Legacy, then get ParticleEmitter. If Shuriken, Emit not emit. (Note upper case E)
Can you define what Shuriken is? I Googled it but only got the weapon type reference.