Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is There a Way to Clear Particle Trails?

Discussion in '5.5 Beta' started by Malveka, Oct 21, 2016.

  1. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    I'm using the new particle trails module and loving it! I have, however, encountered a glitch which is seriously impeding the app demo I'm working on.

    I have numerous particle effects that are stored as prefabs and are managed using a pool manager. The pool manager is persistent throughout all scenes, which enables a relatively small number of particle system effects to be reused throughout the life of the app. This all works well except when I am using particle systems with trails enabled.

    There is a specific situation in which, when a pooled particle system is respawned, there is a momentary flash of the trail effects on the screen from the previous usage of the effect. This is the case even though when the particle system was despawned, I called the Stop method with stop behavior set to StopEmittingAndClear. I also tried calling the Clear method directly and toggling the Enabled state for the trails module - false when despawned and true when spawned again.

    None of the things I tried helped. I still get the momentary flash of the previous state of the trails when a previously used effect is pulled from the pool. It's worth noting that this only happens when the particle effect was terminated by the scene change prior to the effect completing of its own accord. I have the trails set to 'Die with Particles'. When the effect is allowed to die a natural death and is then reused there is no problem. Only when the effect is despawned prematurely due to a scene change does the "trail detritus" appear.

    And so, at last, to my question: Is there any way to reliably clear or reset the trail state inside a particle system?

    The Clear or Stop methods don't appear to do it.

    Ultimately I will submit this as a bug if deemed necessary, but right now I'm looking for a way to get my app behaving properly for a near-in demo.

    Thanks!
    James
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,226
    Hey this sounds like a use case we missed. Please submit a bug and we can sort it out :)
     
    richardkettlewell likes this.