Try creating a public ParticleSystem variable in a script, then in the Unity editor select the GameObject with the ParticleSystem you wish to control.
Then you can edit the ParticleSystem variable's properties:
public ParticleSystem particleSystem;
void Start()
{
particleSystem.startLifetime = 3;
particleSystem.startSize = 2;
...
particleSystem.Play();
}
↧