- Home /
Unreliable particle behaviour when not in view
Hi!
I'm using a Shuriken particle system to create a sun in our game. I have a script that keeps track of the time of day and stops and starts a sunny particle system at dusk and dawn. However, I've found that if I do not look directly at the sun when my script changes the state of the particle system, it appears to ignore certain state changes!
My first script was using enableEmission = true/false. With this, the sun stopped playing properly at dusk, but did not restart with "enableEmission = true" if it was out of view at dawn.
I then changed to using particleSystem.Play()/Stop(). With this, the sun started playing properly at dawn, but did not stop with "particleSystem.Stop()" if it was out of view at dusk.
I think I found a workaround by combining the two methods, and both disabling+stopping or enabling+playing the particle system when I wanted it to change.
With this post, I mainly want to ask if anyone else has experienced the same problem, and perhaps through my own solution provide a possible workaround. I also wanted to ask if anyone knows more about whether this is an intended behaviour or a bug.
If anyone wants to attempt to reproduce the issue I can provide more detailed information about my setup.
Cheers, Jonatan
Your answer
![](https://koobas.hobune.stream/wayback/20220613084935im_/https://answers.unity.com/themes/thub/images/avi.jpg)