- Home /
Question by
hahardyan · Aug 02, 2015 at 06:13 PM ·
animationparticlesystemaugmented-reality
how to play particle system on UI Button??
I have 3d object , this is my AR project, i want my particle system plays when press UI button, how to do that? Can any body help me? Thanks
sa.jpg
(39.9 kB)
Comment
Answer by imilanspinka · Aug 03, 2015 at 06:27 AM
Okay, so what you are probably looking for is this:
GameObject particleSystem; //assign it anyhow
void Start()
{
particleSystem.GetComponent<ParticleSystem>().enableEmmision = false;
}
void OnGUI()
{
if(GUI.Button(....))
{
particleSystem.GetComponent<ParticleSystem>().enableEmission = true;
}
}
Hope this helps, imilanspinka
Your answer
Follow this Question
Related Questions
How would I do enemy damage animation? 0 Answers
ParticleSystem or play a video? 1 Answer
[Help] Modular Particle System with different starting points. 0 Answers
simple explosion animation 1 Answer
Dataset is null 1 Answer