We recently upgraded from Unity 5.4 to 5.5.2p2 and it appears as though all of our gravity values in our particle systems have been reset to 0.
I know the patch notes stated: “Particles: Gravity Modifier can now be a curve over time.” but does this mean that all old gravity values have been reset? ie: Is this new gravity modifier variable replacing the old one and not defaulting to whatever it was set to?
It seems as though we’ll need to manually go through all of our scenes and set the gravity multiplier again per particle system.
This should be no surprise that such thing happens whenever Shuriken gets a big upgrade. In my case, upgrading my particle system from 5.1 which does not have useAutoRandomSeed to 5.5 will be given a false value by default to the said function when the true value is expected in most circumstances.
It should upgrade nicely, and preserve your settings. However, we have an issue logged, which sounds very similar to what you’re describing here: Unity Issue Tracker - Embedded smoke particle systems do not work correctly in the Play mode
(I know it doesn’t sound the same from reading it, but we’ve narrowed it down to some settings (including gravity) not upgrading correctly.)
We are currently investigating the cause.
If you want to upgrade right now, sadly you would have to manually reconfigure any affected systems, but hopefully we will get a fix for this at some point quite soon!
Particle Systems should almost always upgrade nicely, but there are occasionally breaking changes made, which are called out in the Upgrade Guides. Gravity and Random Seeds should both upgrade without problems.
This should only happen if you’ve set a custom randomSeed via script, on the system being upgraded. If that’s not the case, then maybe you’re encountering the same bug we are currently investigating.
Hello. The reproduction project we have for Unity Issue Tracker - Embedded smoke particle systems do not work correctly in the Play mode seems to be an issue with prefabs. Are your particle systems also prefabs or just in the scene? If you have a simple example project I would appreciate it if you could submit a bugreport or just post some simple reproduction steps here.
Hey all, thanks for the speedy replies. At the very least, it’s nice to know this could be a known issue and not something we accidentally brought upon ourselves (I didn’t find anything about this when searching the forums prior to making this post).
After closer inspection (as karl suggested), it appears not all particle system gravity values were reset.
It’s actually not very clear which ones were affected, but I’ll list some specifics below (our project has hundreds of particle systems). We didn’t notice this issue until a week after updating, so I couldn’t really go back to 5.4 to verify what all things should have been set to, but these are some particulars:
All of our particle systems in our Resources folder (that we spawn at runtime as prefabs) seem to have retained their correct values.
“CFX3_SmokeColumn_Blue” (prefab embedded in a scene from JMO) has a gravity modifier of 0, when it should be 0.01.
“Engine Puff” (prefab embedded in a scene) has a gravity modifier of -0.03 and seems fine (unaffected by the bug).
This one is odd, but all “Fire” particle systems (prefab embedded in a scene) have a gravity modifier of -0.3, but it looks like it should be set to -0.01.
It’s worth noting that some of these particles may have been modified via scripts, as the JMO asset comes with a custom Unity Editor plugin to allow quickly modifying size/speed/duration/etc at the push of a button. Unfortunately I cannot say for sure which ones used this tool.
I won’t be able to provide a sample project any time soon (our proj is several GB and not a good “hello world” candidate). We’re also relatively stuck on 5.5.2p2 for now since that’s the latest version both XB1 and PS4 development support (we’re trying to keep all platforms on the same Unity ver & repo).
I think in the end, it affects less particle systems than we thought (perhaps only 20%) so we’ll “fight forward” and manually spot check everything as best we can.
After further investigation we believe we have identified the issue. It seems that ParticleSystems are reverting to the prefab values and ignoring any overridden values in scenes for gravityScale and possibly a few other values. It looks like an internal serialization bug, probably due to using the same property name when we upgraded from floats to MinMaxCurves. The correct values should still be in the scene file so in theory if we get this fixed and a patch out then it should just go back to the correct values. That’s just an educated guess at this point though, have to actually do the fix first
I had a suspicion that it could have also affected other properties, as one of our looping “water fountain” particle systems also appeared to have some sort of newly added “delay” where gaps would occur where no particles were spawning for a brief time window.
EDIT: If you know exactly which other values it could also be reverting, that would help us greatly so we can double check those in the inspector.
Hi.
This bug is proving quite tricky to fix, it’s a really simple issue but internally a bit of a pain to detect.
So here is a simple work around whilst we try and figure out a proper fix.
First make a backup of any of the files you are going to change!
Open your scene file(it needs to be text, not binary) and do a find and replace for InitialModule.gravityModifier, replace with InitialModule.gravityModifier.scalar.
Save the scene, let it reload and it should be fixed.
Like so: