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
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