Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Particle system prewarm flag is ignored when calling Start after Stop was previously called

Discussion in 'General Graphics' started by SVC-Games, May 14, 2024.

  1. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    143
    Pretty much what title says. If you have a particle system with prewarm enabled it will start as expected: some particles at different stages of their lifetime.

    If you call Stop() and then a while later Start(), the particle system will restart from scratch instead of prewarmed.

    This was observed when updating from 2022.3.26 to 2022.3.28.

    This change from 2022.3.28 might be related:

     
  2. gabriel-delacruz

    gabriel-delacruz

    Unity Technologies

    Joined:
    May 19, 2021
    Posts:
    42
    Hi!
    Could you fill in a bug report, please?
    It would help us reproducing and keeping track of it.
    Thank you in advance
     
  3. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    143
    Reported!

    Furthermore, it only happens if you call Particles.Play() when there's still some particles active after calling Particles.Stop().

    To summarize:
    • If there's NO particles alive and call Play after previously calling Stop: The particle system will restart prewarmed.
    • If there's any particle alive and call Play after previously calling Stop: The particle system will start spawning at the defined rate but no prewarmed particle will appear.

    A workaround is to call Particles.Clear() before Particles.Play(), this will ensure the system will restart prewarmed even if there were some remaining particles.
     
    gabriel-delacruz likes this.
  4. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    143
    gabriel-delacruz likes this.