Untiy particle system play

Code Example - Untiy particle system play

                
                        public GameObject hitEffect;

GameObject effect = Instantiate(hitEffect, transform.position, Quaternion.identity);
effect.GetComponent<ParticleSystem>().Play();

//Delay destruction of the effect
Destroy(effect, 5f);