I've just noticed that a particle effect is spawning particles in exactly the same direction each time it's triggered? I'd always assumed that random emission directions and other particle values would be different every time the effect was triggered, but it doesn't seem to be the case right now, you seem to get the same sequence each time (which is quite obvious when you've got an effect spawning just a few particles and triggered repeatedly) Is this normal/expected behaviour? (Do particle systems have their own seeded RNG instances, then? - and if so, is it possible to set the seed?) Or is it a bug? (I'm currently using 5.4.0b13, haven't tested it on other versions yet)
Also sounds like you have hit this bug: https://issuetracker.unity3d.com/is...e-using-the-exact-same-seed-for-randomisation
Yes, looks like that's it. Looking in the debug mode inspector, I can see that a new particle system always has the seed set to 1111270184 (Manually changing it does effect the random sequence, but setting it to zero there doesn't seem to have the intended effect of it picking a random seed value on awake)
We will fix this bug in 5.4, but it looks like we won't have it fixed in time for the first release. As Karl says, you can work around it by assigning a random seed yourself via script when instantisting a particle system. It's not ideal though, so we will be looking to fix it as soon as we can!
I've confirmed that setting 'ParticleSystem.randomSeed' does not actually make any changes to the outcome of the particles.
We are very close to getting a fix into a patch. It's taken a little longer than hoped because we felt that the best fix was to expose controls in the inspector to allow you to have a varying random seed, or a fixed one of your choosing. This has meant we needed a bit more time to get it all done and tested. I promise you it's my number 1 priority though I'll update again when I can confirm which patch it will arrive in. Sorry for the inconvenience!
Good news - we've finally landed the fix You can expect it in 5.4.0p4. We now have 2 new options in the main Particle System settings in the Inspector: Random Seed (number) and Auto Random Seed (check box). Random Seed maps to the pre-existing script property - if you set any number here, then your particle system will look exactly the same every time it is played. It is only visible/used when the Auto checkbox is unchecked. Auto Random Seed toggles whether the first property is used. If it is checked, then you will get different random numbers each time the system is played. For example, if you are spawning particles on the surface of a sphere, this controls whether the exact spawn positions chosen on the sphere will be different each time the emitter is triggered (checked), or the same (unchecked). Particle Systems created in 5.3 or earlier should upgrade to restore the old randomness behavior. However, systems created in 5.4 will not be able to auto-upgrade, due to the nature of the bug. For these systems, simply tick the Auto Random Seed option, if you want the system to be different each time it is triggered. Any new systems created after this bug fix will have the checkbox ticked, as that is usually the behavior you want.
Any idea when 5.4.1 or 5.4.0p4 will be released? 5.4.0p3 is not even out yet. PAX West is next week, and non-random particles look awful in our game. If not, is this the proper work around: Particle.randomSeed = (uint)Random.Range(0,9999999); Particle.Simulate(0, true, true); Particle.Play(); Thanks!
We aim to do weekly patch builds, so in theory p3 will be this week, and p4 next week. However, if QA find issues in any particular patch release, this can make the schedule slip, so I can't say for sure. Regarding the workaround, I would expect something like this to work.. but I haven't tried it: Code (CSharp): system.Stop(); system.randomSeed = (uint)Random.Range(0,9999999); system.Play();
use this to u particle system Particlerandomseed.cs 5.4.0f3 it's working! Code (CSharp): using UnityEngine; using System.Collections; public class Particlerandomseed : MonoBehaviour { void Awake() { if (this.GetComponent<ParticleSystem>() == null) return; this.GetComponent<ParticleSystem>().Stop(); this.GetComponent<ParticleSystem>().randomSeed = (uint)Random.Range(0,9999999); this.GetComponent<ParticleSystem>().Play(); } }
Hello, Is there a working way to achieve seamless looped particles with PS? I mean like for static particles that should keep their positions between simulations of the particle system. I HAVE ALREADY TRIED: - turning off auto random seed - resimulating/clearin/stoping&playing when simulation time reaches its end. This seems a serious issue to me. I am using U 5.4.3 Best!
Hi, so i did uncheck the Auto Random Seed box and put some random number like 1000 on the random seed box, but for reason the effect is still randomly spawning at random places. I want it at the same spot every single time but it's not working. How do I fix this? Using Unity 5.50f3
I can only guess without seeing the project.. e.g. it's important to configure the seed before simulating the effect. Setting it during playback won't have any effect. Another guess: you're hitting this bug, which will be fixed soon: https://issuetracker.unity3d.com/is...randomized-when-particle-system-is-not-looped If that doesn't help you, consider submitting a project as a bug report, demonstrating the problem you're having. Then we can help you further.
Hello, I am running 2017.3 and it appears that I am still running into the sub Emitter particle systems not being random even with Auto Random Seed checked. Setting the individual sub emitters to looping does not seem to do anything. If I set the "parent" Particle system to looping than randomization seems to work on all the sub Emitters. If the "parent" particle system is not looping I lose randomization on all the sub emitters. Is there a setting I am missing or is this the same bug as stated above?
Hi, The original bug is fixed, so you may want to submit a new bug report for us to investigate. Thanks,
I thought I had this error but it turned out I just had under the shape module, Arc>Mode set to Loop instead of Random!
This bug is back in 2019. Please fix PERMANENTLY. Blocked by this simple request to randomize images on a sheet, guys. Years.
Hi, you’ll need to submit a bug report with some detail about what problem you’re facing. There isn’t any prior mention of randomising images on a sheet in this thread, and it’s quite hard to help you when that is the only detail you’ve given. If you really are blocked, a polite and detailed request for help would speed things up for you. You are welcome to reply with the case number once you have submitted the bug report - it will help me find the report in our system. Best Regards,
If you have a particle system in which you've manually set the seed & unchecked Auto Random Seed, it will not be random. But that's by design. I noticed some particle systems imported from an older broken version of Unity would retain the original non-random behavior until you check Auto Random Seed back on.