Is there any way i can it via script?
2 Answers
2No there is not. You would have to re-create the entire particle system.
Actually there is a way and it is in the documentation:
public class ExampleClass : MonoBehaviour
{
private ParticleSystem ps;
void Start()
{
ps = GetComponent<ParticleSystem>();
ps.Stop(); // Cannot set duration whilst particle system is playing
var main = ps.main;
main.duration = 10.0f;
ps.Play();
}
}
You can use the main object attached to the particle systems.
darn......
– luniacI bet there are other particle plugins out there that you can get who have dynamic particle systems though, if that's what you really need.
– smoggachnaa it's a very very minor issue, almost a non issue at all. But thanks :)
– luniac