- Home /
Emit particles from a child object
Sorry for such an easy question, but I've been having a lot of trouble and the unity link that I though would answer my question seems to be not working.
I have a game object with child particle system attached. I'm trying to set it to emit particles when the parent object is clicked. I thought this would be fairly simple but I'm having trouble. Currently I have it working by finding the particle's game object and playing it that way, but isn't there a better way to trigger the attached particle effects? I was trying to use GetComponentsInChildren
but I wasn't having much luck.
private var SparkleParticles : GameObject;
SparkleParticles = GameObject.Find("SparkleParticles");
function OnMouseDown(){
SparkleParticles.particleEmitter.emit = true;
}
Your answer
Follow this Question
Related Questions
Problems with mesh particle emitter 1 Answer
Specific Game Object - Particle Emitting 0 Answers
How can I solve my Mesh Particle Emitter problem? 1 Answer
Particle emitter works intermittently 0 Answers
Particle system question 1 Answer