Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved Unkillable particle strip quad

Discussion in 'Visual Effect Graph' started by GameDeveloper1111, Oct 27, 2021.

  1. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    Edit:

    Resolved:

    Solution:

    1. In VFX Graph 12.x, this bug no longer exists.

    2. In VFX Graph 10.5.1, use this workaround: Set the lifetime of the particle in the strip to anything to make the particle strip quad honor the
    alive == false
    condition, and then disable
    Age Particles
    in the
    Update Particle Strip
    's inspector to make the particle in the strip immortal until the user-defined condition is met.

    ---

    Original post:

    ---

    I set
    alive = false
    on an otherwise immortal particle strip but the quad remains (magenta below):

    unkillable-particle-strip-quad.gif

    The blue square is a particle head, which spawns the particle strip over time.

    Here is the graph:

    upload_2021-10-27_8-15-24.png

    The particle quad (blue) honors the
    alive == false
    condition and disappears. The particle strip quad (magenta) does not honor the
    alive == false
    condition and does not disappear.

    The docs say that killing immortal particles should be possible:

    upload_2021-10-27_8-9-19.png

    Does anyone know how to kill particle strip quads in this case?
     
    Last edited: Oct 28, 2021
  2. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    A workaround:

    Setting lifetime to anything made the particle strip quad honor the
    alive == false
    condition. I set lifetime to one hour which is effectively immortal:

    upload_2021-10-27_8-30-33.png

    This to me implies that there is a bug: Particle strip quads do not honor
    alive == false
    if the particle in the strip does not have a lifetime.
     
  3. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    549
    Hi @GameDeveloper1111 ,

    Seems to work for me in 12.x of VFX Graph:


    If you select the Update Particle Strip context, can you check in the Inspector if Reap Particles is enabled? This setting allows particles to be discarded if their alive attribute is set to false or if their age exceeds their lifetime/



    If you don't set any lifetime in a system, the particles are immortal. Alternatively, in the same Inspector field, you can turn off reap or the ageing of the particles, depending on the desired outcome.
     

    Attached Files:

    GameDeveloper1111 likes this.
  4. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    Hi Vlad,

    Sorry, I forgot to mention that I'm using 10.5.1 on 2020.3.14f1. That's great to hear that it works in 12.x.

    In this version there is no Reap Particles option without lifetime:

    upload_2021-10-28_6-8-21.png

    With lifetime:

    upload_2021-10-28_6-8-36.png

    Since I'm using an old version I'm content with the workaround of setting lifetime to anything and then disabling
    Age Particles
    .
     
    VladVNeykov likes this.
  5. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    549
    It might have been a bug then; sorry you had to deal with it, but rest assured the future is looking bright(er)! :)