isAlive() isn’t working correctly in 5.3.1. If you see the assets of Jean Moreno: Cartoon FX Pack, you can see his last version has a - fixed CFX_AutoDestructShuriken not working with some prefabs (Unity 5.3.1).
It doesn’t work with some particle systems, depending the settings (start lifetime, duration, emission rate), but is a confirmed bug for sure.
This problem is quite serious as it affects all the gameplay. I’m now stuck from upgrading my game to Unity 5.3.1 because of this.
I’m using a pooling system and I found that if I set the simulation space to “world”, the problem is gone. But this isn’t the correct way since stated that “world simulation space” will disable the automatic culling, and thus affecting the performance.
Currently I’m using the assets of Jean Moreno: Cartoon FX Pack, but I modify some of the particle from the prefabs that provided. It’s very time consuming if I need to adjust every prefabs that I created from there. besides that, I also found that by pooling the prefabs of the particles. Not everyone of it will deactivate by themselves.(Means same setting, some are giving the IsAlive return false, but some are still returning true for all the while).
Hope to get the patches for this fixes ASAP. Thank you.
Here’s the tool I made to fix the duration issue on the effects of my packs.
Unfortunately it looks like that fix doesn’t work 100% of the time - I’ve seen cases where the exact same Particle System would have IsAlive() working and sometimes not. It could have to do with the number of concurrent Particle Systems in the Scene as I placed a bunch of them in a blank Scene and observed the Hierarchy to test my fix.
It should still help to fix the ones where the error was always appearing though!
Usage: place in an Editor folder and look in the menu:
Tools/Fix particle duration-lifetime for selected GameObjects: works on selected GameObjects in the Hierarchy or selected Prefabs in the Project view.
Tools/Fix particle duration-lifetime for selected Folders: works on selected Folders in the Project view (not sure that this one will work on Mac, I’m doing some funky slash characters replacement for Windows compatibility)
Make sure you backed up your project before using this script !
Your tools did save some times but it’s not applicable for some particles that has an emission rate(those spawn 60 particles per second). So in order to play safe I’ll still check the particles one by one.
I found that like what you said the life time fixes won’t simply 100% works on even the same type of particles all the time.
If we don’t use the IsAlive() function, can we just use a yield return new WaitForSeconds(particle duration) for all the prefabs that isn’t looping type in order to fix the problem? Just search around and found this from other ppl yesterday and I feel like it might works, that’s why I’m suggesting this to you.
Thank you once again Jean Moreno and Good work for your particles plugins(I had purchased some of them )
Yes, using a fixed delay to disable/destroy the GameObjects seems like the most sensible alternative until IsAlive() is fixed.
The drawback is that you would have to manually adjust that delay for each effect, which for a big project could end up taking a lot of time (also it would only work for non-dynamic particles where you know exactly when they will be finished).
The issue tracker said i is fixed but it is not… upgraded because I needed a fix for the UI and resolution (that was fixed) but this new bug has kind of wrecked all my pooling system. Hope it gets fixed soon