- Home /
Changing particlesystem at runtime
Hi,
i am trying to change two particlesystems at runtime and some changes are accepted others are ignored.
var FrontRate = Front.emission.rate;
var Trailrate = Trail.emission.rate;
if (!Front.isPlaying)
{
Front.Play();
}
if (!Trail.isPlaying)
{
Trail.Play();
}
if (F_Temperatur > 1480.0f)
{
Front.startColor = White;
Trail.startColor = White;
FrontRate = 100;
Trailrate = 1800;
Front.startSize = 1;
Trail.startLifetime = 5;
}
else if (F_Temperatur > 1355.0f)
{
Front.startColor = LightYellow;
Trail.startColor = LightYellow;
FrontRate = 100;
Trailrate = 1600;
Front.startSize = 1;
Trail.startLifetime = 4.75f;
}
And so on...
There are also instances when the changes for one are applied but the other one stays the way it is.
Another situation that is not working as intended is that sometimes the system ignores the startcolor set by me and just turns white.
So i would be thankful for any help or hints what could be the cause for this behaviour
Regards
Your answer
Follow this Question
Related Questions
Destroy particles based on bounds not lifetime 0 Answers
particle effect repeat twice after collision 0 Answers
Why does my particle system get enabled with a delay? 2 Answers
Can I make uniform emission for Particle System? 2 Answers
Can you still not change the Velocity of spawned particles? 2 Answers